[go: up one dir, main page]

CN118897708B - View control method, device and storage medium - Google Patents

View control method, device and storage medium Download PDF

Info

Publication number
CN118897708B
CN118897708B CN202411390821.0A CN202411390821A CN118897708B CN 118897708 B CN118897708 B CN 118897708B CN 202411390821 A CN202411390821 A CN 202411390821A CN 118897708 B CN118897708 B CN 118897708B
Authority
CN
China
Prior art keywords
target
view
user
menu
isolation type
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
CN202411390821.0A
Other languages
Chinese (zh)
Other versions
CN118897708A (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.)
Shenzhen Smart City Technology Development Group Co ltd
Original Assignee
Shenzhen Smart City Technology Development Group 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 Shenzhen Smart City Technology Development Group Co ltd filed Critical Shenzhen Smart City Technology Development Group Co ltd
Priority to CN202411390821.0A priority Critical patent/CN118897708B/en
Publication of CN118897708A publication Critical patent/CN118897708A/en
Application granted granted Critical
Publication of CN118897708B publication Critical patent/CN118897708B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0482Interaction with lists of selectable items, e.g. menus
    • 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/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming

Landscapes

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

Abstract

本申请公开了视图控制方法、设备及存储介质,本申请涉及数据处理技术领域,该方法在检测到用户的访问请求时,获取用户对应的隔离类型值,根据隔离类型值确定匹配的隔离类型,并获取与所述隔离类型关联的目标视图,然后获取与所述目标视图关联的目标菜单,并确定目标菜单在目标视图中的显示方式,进而在检测到目标视图中对应的控件被触发时,将所述目标视图展示在界面中。上述方法通过建立菜单与视图的动态关联,实现了按业务模块划分和动态管理权限的能力,从而提高系统对视图权限管理的灵活性。

The present application discloses a view control method, device and storage medium, and the present application relates to the field of data processing technology. When the method detects the user's access request, it obtains the isolation type value corresponding to the user, determines the matching isolation type according to the isolation type value, obtains the target view associated with the isolation type, and then obtains the target menu associated with the target view, and determines the display mode of the target menu in the target view, and then displays the target view in the interface when the corresponding control in the target view is detected to be triggered. The above method realizes the ability to divide and dynamically manage permissions by business modules by establishing a dynamic association between menus and views, thereby improving the flexibility of the system in managing view permissions.

Description

View control method, device and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a view control method, a device, and a storage medium.
Background
A view refers to a portion of a user interface that is responsible for presenting data and receiving user input. Currently, in related schemes, the rights of views in a system are typically statically bound to a specific role or user, and when the business needs change, the rights settings need to be frequently modified and updated, which results in a low flexibility of the related scheme for view rights management.
The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present application and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
The application provides a view control method, a device and a storage medium, which aim to solve the problem that the flexibility of a related scheme on view authority management is low.
In order to achieve the above object, the present application provides a view control method, which includes the following steps:
when an access request of a user is detected, acquiring an isolation type value corresponding to the user;
determining a matched isolation type according to the isolation type value, and acquiring a target view associated with the isolation type, wherein the target view is at least one;
acquiring a target menu associated with the target view, and determining a display mode of the target menu in the target view;
and when the corresponding control in the target view is detected to be triggered, displaying the target view in an interface, wherein the target menu is arranged in the target view in the display mode.
In an embodiment, after the step of displaying the target view in the interface when the control corresponding to the target view is detected to be triggered, the method further includes:
When the target menu is detected to be triggered, acquiring role information of a logged-in user;
if the role information is matched with the target menu, determining and displaying a page associated with the target menu;
otherwise, displaying the prompt information of insufficient permission.
In an embodiment, before the step of acquiring the role information of the logged-in user when the target menu is detected to be triggered, the method further includes:
Creating role information and configuring a target menu which is accessed by the role information with permission;
and storing the role information in association with the target menu so that a user with the role information has authority to access the target menu.
In an embodiment, before the step of obtaining the isolation type value corresponding to the user, the method further includes:
when an access request of a target user is detected, acquiring user information in the access request;
If the user information is a new user account, inquiring a target role and a target isolation type value corresponding to the target user in a database according to the user information, and feeding back the target role and the target isolation type value to a user terminal corresponding to the target user, so that the user terminal generates an access request carrying the target role and the target isolation type value during access;
otherwise, executing the step of obtaining the isolation type value corresponding to the target user.
In an embodiment, before the step of obtaining the isolation type value corresponding to the user when the access request of the user is detected, the method further includes:
Acquiring configuration information of a view, and creating the view according to the configuration information, wherein the configuration information comprises a view ID, a view name and a dimension type;
configuring a menu list displayed in the view, wherein the menu list comprises at least one menu, and the menu is displayed in the view in a preset display mode;
Determining an isolation type according to the configuration information of the view, and storing the isolation type and the configured view in an associated manner;
And when the access request of the user is detected, executing the step of acquiring the isolation type value corresponding to the user so as to determine the matched isolation type through the isolation type value and acquire the view associated with the isolation type.
In an embodiment, after the step of displaying the target view in the interface, the method further includes:
When the user clicking the first menu is detected, verifying whether the role of the user has permission to access the first menu;
if the permission exists, the user jumps to the corresponding page, and if the permission does not exist, the user is forbidden to access and feed back the corresponding prompt.
In an embodiment, after the step of displaying the target view in the interface when the control corresponding to the target view is detected to be triggered, the method further includes:
after detecting that a user enters the target view, recording clicking times of each target menu in the target view;
And sorting all the target menus according to the clicking times, and displaying the sorted target menus in the target view.
In an embodiment, before the step of obtaining the isolation type value corresponding to the user when the access request of the user is detected, the method further includes:
acquiring created character information and a second menu;
And establishing corresponding function mapping according to the relation between the role information and the second menu, and storing the role information, the second menu and the function mapping into a database.
To achieve the above object, the present application also provides a view control device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the view control method as described above.
To achieve the above object, the present application also provides a storage medium which is a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the view control method as described above.
The application provides a view control method, view control equipment and a storage medium, wherein when an access request of a user is detected, an isolation type value corresponding to the user is obtained, then a matched isolation type is determined according to the isolation type value, a target view associated with the isolation type is obtained, wherein at least one target view is obtained, a target menu associated with the target view is obtained, the display mode of the target menu in the target view is determined, finally when the corresponding control in the target view is detected to be triggered, the target view is displayed in an interface, wherein the target menu is arranged in the target view in the display mode, and the capability of dividing and dynamically managing rights according to service modules is realized by establishing dynamic association of the menu and the view, so that the flexibility of the system for managing the rights of the view is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the application or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a flow chart of a first embodiment of a view control method of the present application;
FIG. 2 is a block diagram of a view control system according to an embodiment of the present application;
FIG. 3 is a flow chart of authority determination according to an embodiment of the present application;
FIG. 4 is an interaction flow chart of each module according to an embodiment of the present application;
FIG. 5 is a flow chart of a second embodiment of the view control method of the present application;
FIG. 6 is a flow chart of a third embodiment of the view control method of the present application;
FIG. 7 is a flow chart of a fourth embodiment of the view control method of the present application;
fig. 8 is a schematic architecture diagram of a hardware running environment of a view control device according to an embodiment of the present application.
The achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
In order that the above-described aspects may be better understood, exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the application to those skilled in the art.
In order to better understand the above technical solutions, the following detailed description will refer to the accompanying drawings and specific embodiments.
The main solution of the application is that when an access request of a user is detected, an isolation type value corresponding to the user is obtained, a matched isolation type is determined according to the isolation type value, a target view associated with the isolation type is obtained, wherein at least one target view is obtained, a target menu associated with the target view is obtained, the display mode of the target menu in the target view is determined, and when the triggering of a control corresponding to the target view is detected, the target view is displayed in an interface, wherein the target menu is arranged in the target view in the display mode.
Currently, in related schemes, the rights of views in a system are typically statically bound to a specific role or user, and when the business needs change, the rights settings need to be frequently modified and updated, which results in a low flexibility of the related scheme for view rights management.
When an access request of a user is detected, an isolation type value corresponding to the user is obtained, then a matched isolation type is determined according to the isolation type value, and a target view associated with the isolation type is obtained, wherein the number of the target views is at least one, a target menu associated with the target view is obtained, the display mode of the target menu in the target view is determined, and finally when the triggering of a control corresponding to the target view is detected, the target view is displayed in an interface, wherein the target menu is arranged in the target view in the display mode, and the capability of dividing and dynamically managing rights according to service modules is realized by establishing dynamic association of the menu and the views, so that the flexibility of managing the rights of the system to the views is improved.
It should be noted that, the execution body of the present embodiment may be a view control system, or may be a computing service device having functions of data processing, network communication, and program running, such as a tablet computer, a personal computer, a mobile phone, or a view control device capable of implementing the above functions, which is not limited in this embodiment. The present embodiment and the following embodiments will be described below using a view control system as an execution subject.
Example 1
Referring to fig. 1, in a first embodiment, the view control method includes the following steps:
And step S10, when the access request of the user is detected, acquiring an isolation type value corresponding to the user.
In this embodiment, the view control system executes processing actions, as shown in fig. 2, and fig. 2 is a block diagram of the view control system according to an embodiment of the present application, where the view control system includes a view module, a menu permission module, a role module, a user module, a data dimension module, and a data permission module. When detecting that a user accesses the view control system through an interface of a user side, the user side generates an access request and sends the access request to the view control system, wherein the access request carries user information corresponding to the user. When the view control system detects an access request of a user, an isolation type value and role information corresponding to the user are obtained from the access request, wherein the isolation type value can exist in the access request in a character string form, and the role information can be stored in the access request in a tag form. It should be understood that after the user registers, the view control system may assign a corresponding isolation type value and role information to the registered user terminal, and when the user terminal needs to access the view control system, the user terminal may feed back the isolation type value and role information assigned by the view control system to the view control system, so that the view control system opens corresponding rights to the user terminal according to the isolation type value and the role information.
Optionally, the manner in which multiple modules are created in a view, the goals and functions of the view, and the roles of the modules, are determined first. Depending on the location and size of the individual modules, each module is a separately reusable component, a suitable front end framework or library (e.g., act, vue. Js, angular, etc.) is selected. The modules are defined, each of which is defined as a reusable component. The input-output interfaces of the component, such as attributes (props), states (states), events, etc., will then be defined, followed by the HTML structure, CSS style, and JavaScript logic of the module, ensuring that the module can fit different screen sizes and devices. And then, carrying out unit test on each module to ensure that the module works according to expectations, and particularly, whether the interaction between the test module and other modules or external systems is normal or not. In turn, integrates module container components, organizes all sub-modules by creating one container component, and sets up mechanisms for data transfer, such as transferring data down using props or sharing state using Context or state management libraries (e.g., reduce). For large-scale applications, lazy loading techniques can be used to delay loading non-critical modules, and code segmentation is performed by utilizing Webpack and other build tools, so that initial loading time is reduced, views are finally deployed to a production environment, and application performance and user experience problems are monitored by using tools.
Optionally, in this embodiment, before the step of obtaining the role information corresponding to the user, the method further includes:
the method comprises the steps of obtaining access request of a target user, obtaining user information in the access request when the access request of the target user is detected, inquiring a target role and a target isolation type value corresponding to the target user in a database according to the user information if the user information is a new user account, feeding the target role and the target isolation type value back to a user terminal corresponding to the target user, enabling the user terminal to generate the access request carrying the target role and the target isolation type value when the user terminal accesses, and otherwise, executing the step of obtaining the isolation type value corresponding to the target user.
Specifically, when a target user wants to log in the view control system, a user name and a password are input in a login interface, after the login is successful, the user module determines whether a new user account is a new user account according to user information of the user, if yes, a corresponding authorized view and an authorized menu under the view are provided for the user according to the user information, and the target role and the target isolation type value are fed back to a user side corresponding to the target user, so that the user side generates an access request carrying the target role and the target isolation type value during access. If not, the isolation type value and the role information in the user information are acquired. In addition, after the user inputs the user name and the password in the login interface, the user module can verify the user name and the password to judge whether the user name and the password are correct.
And step S20, determining a matched isolation type according to the isolation type value, and acquiring a target view associated with the isolation type, wherein the number of the target views is at least one.
In this embodiment, the data authority module performs a processing action, and determines whether the user has authority to access the specific data according to the isolation type value. And when the isolation type value is inquired that the corresponding target view is associated, the target view is used as specific data which the user has the right. And judging whether the user has the authority to access the specific menu or not by the menu authority module according to the association relation between the user and the roles associated under the view, and determining the target menu which can be accessed by the user. And the data authority module judges whether the user has authority to access the data of the target view according to the data dimension isolation type value of the user and the isolation type of the accessed view. When a user accesses a view requiring data isolation or performs a corresponding operation, the system determines whether the user has permission to access specific data according to the isolation type value of the user and the isolation type of the view. In addition, a data mapping relation can be set for the associated isolation type value and the isolation type, and the isolation type value and the isolation type are handled in a table through table mapping, so that when the isolation type corresponding to the isolation type value is determined, the isolation type corresponding to the isolation type value can be directly queried from the mapping table, and the confirmation efficiency of the view is improved.
Illustratively, user A associates an isolation type value of "sales department" and the "sales report" view associates an isolation type of "institution". When the user A accesses the 'sales report' view, the system judges according to the isolation type value of the user A and the isolation type of the view, and if the isolation type value of the user A matches the isolation type of the 'sales report' view, the system has the authority to access the data related to the 'sales department' under the view.
Further, in this embodiment, before the step of acquiring the isolation type value and the role information corresponding to the user when the access request of the user is detected, the method further includes:
And establishing corresponding function mapping according to the relation between the character information and the second menu, and storing the character information, the second menu and the function mapping into a database.
Specifically, all the created character information and the second menus are acquired from the data, one character information can be matched with a plurality of second menus, a functional relation is set according to the mapping relation between one character information and the corresponding matched plurality of second menus, and the functional relation can be used for inquiring and outputting the matched second menus according to the input character information. And finally, storing the role information, the second menu and the function map into a database.
In addition, a data dimension module can be created to realize the creation and management functions of the data dimension, including the definition of the isolation type and the isolation type value. Different isolation types, such as "organization", "region", etc., and corresponding isolation type values, such as "A-province", "B-city", etc., may be created. The user may associate with an isolation type value of a data dimension to enable isolated access to particular data. And storing the common isolation type value and the isolation type in an associated manner, wherein a data structure for storing the data dimension information comprises a dimension ID, a dimension type name and value data contained in the dimension type.
For example, an isolation type of "organization" is created, and a plurality of isolation type values, such as "sales department", "market department", etc., are defined. The user may associate himself with the "sales department" isolation type value to enable access rights to the "sales department" data. The view can be associated with one data dimension type to realize the isolation of different views from different data dimensions, and when a user enters a sales report view, the user can switch between the associated isolation type values of sales department and market department.
And step S30, acquiring a target menu associated with the target view, and determining a display mode of the target menu in the target view.
In this embodiment, after the target view is determined, the target menu included in the target view, that is, all target menus associated with the target view, needs to be acquired, where the target menu has a preset display mode, and the display mode of the target menu in the target view may be determined by determining the target menu. It can be understood that the display mode of the target menu in the target view is the display mode of the control of the target menu in the target view.
And step S40, when the triggering of the corresponding control in the target view is detected, the target view is displayed in an interface, wherein the target menu is arranged in the target view in the display mode.
In this embodiment, after determining a target view and a target menu of a user with access rights, detecting a selection operation of the user in a front end interface of a view control system based on a selection device, and after clicking the target view based on the selection device, displaying a control of the target menu and the target view in the interface, where the target menu is arranged in the target view in the display manner. It can be understood that the number of the target views with access rights of one user can be multiple or one, one target view contains multiple target menus, and one target menu is associated with a corresponding presentable data page and is displayed after the target menu is triggered.
Optionally, in this embodiment, after the step of displaying the target view and the target menu in the interface based on the selection operation of the user, the method further includes:
when the user clicks the first menu, verifying whether the role of the user has authority to access the first menu, if so, jumping to a corresponding page, and if not, prohibiting the user from accessing and feeding back a corresponding prompt.
Specifically, when a user acquires a menu and clicks the menu, the system can verify whether the role of the user has authority to access the menu, if so, the user jumps to a corresponding page, and if not, a corresponding prompt is given or the user is forbidden to access. For example, user A has a "sales manager" role, which is configured to have access to a menu "monthly sales report" under the "sales report" view. When the user A clicks a menu 'monthly sales report' under a 'sales report' view, the system verifies the role authority of the user A, if the authority exists, the user jumps to a page for displaying the 'monthly sales report', if the authority does not exist, prompt information is given, and the user is informed that the user does not have access authority.
Optionally, the manner in which the view control system displays the menu may also be that after the user logs in to the view control system, as shown in fig. 3, fig. 3 is a permission judgment flow chart related to the embodiment of the present application, after the user requests to access a view, the data permission module judges whether the role of the user can access the view, if so, continues to judge whether the corresponding menu is included in the views, if so, access is allowed, and if not, access is denied.
In addition, the menu module contained in the view control system can realize the functions of creating and managing menus and is used for displaying contents in a menu area on the left side of the system. Each view has its own menu definition, a multi-level menu structure can be configured, and the user can switch to the corresponding page by clicking on the menu. For example, in a "sales report" view, multiple menu items may be created, such as "monthly sales report", "quarterly sales report", and the like. The user clicks the menu of the monthly sales report form in the menu area on the left side of the system, and the system is switched to a corresponding page to display the monthly sales report form data.
Exemplary, as shown in fig. 4, fig. 4 is an interaction flow chart of each module related to an embodiment of the present application. Firstly, the user completes registration through the user module, and the view module allocates corresponding view rights to the user. After the user logs in through the user module, the view module displays the corresponding view to the user terminal, and the user can manage personal information in the user module. The menu module is used for realizing the functions of creating and managing the menu and realizing the function of switching the menu. After the view module displays the view on the user side, the menu authority of the user is verified through the menu module, and when the user has the menu authority, the user jumps to the corresponding page. The data dimension module is used for realizing the creation and management functions of the data dimension, including definition of the isolation type and the isolation type value, and associated storage of the isolation type and the isolation type value. The data authority module can judge whether the user has authority to access certain data according to the data dimension isolation type value of the user and the isolation type of the accessed view. The character module can realize the creation and management functions of the character, including definition of the character and maintenance of the relation between the character and the view.
In the technical scheme provided by the embodiment, when an access request of a user is detected, an isolation type value corresponding to the user is obtained, then a matched isolation type is determined according to the isolation type value, and a target view associated with the isolation type is obtained, wherein at least one target view is obtained, a target menu associated with the target view is obtained, a display mode of the target menu in the target view is determined, and finally when a corresponding control in the target view is detected to be triggered, the target view is displayed in an interface, wherein the target menu is arranged in the target view in the display mode, and the capability of dividing and dynamically managing rights according to a service module is realized by establishing dynamic association of the menu and the view, so that the flexibility of the system for managing the rights of the view is improved.
Example two
Referring to fig. 5, in the second embodiment, before the step S10, the method further includes:
and S50, acquiring configuration information of the view, and creating the view according to the configuration information, wherein the configuration information comprises a view ID, a view name and a dimension type.
Step S60, configuring a menu list displayed in the view, wherein the menu list comprises at least one menu, and the menu is displayed in the view in a preset display mode.
In this embodiment, the view module executes configuration information of the acquired view, where the configuration information may be input to the view control system by an administrator through an interface and fed back to the view module by the view control system. After the view module obtains the configuration information, the configuration information is analyzed first, then a view is generated according to the analyzed configuration information, and the view can be generated by using a template engine and a front end frame technology. After the view is generated, preset menu configuration information is acquired, and a menu list displayed in the view is determined according to the menu configuration information, wherein the menu list is a group of arranged menus and comprises at least one menu, and the menu is displayed in the view in a preset display mode.
And step S70, determining an isolation type according to the configuration information of the view, and storing the isolation type and the configured view in an associated mode.
And step S80, when the access request of the user is detected, executing the step of acquiring the isolation type value corresponding to the user so as to determine the matched isolation type through the isolation type value and acquire the view associated with the isolation type.
In this embodiment, after the view is created, an isolation type preset in configuration information of the view is obtained, and the isolation type is associated with the configured view and is stored in a database. In addition, the isolation type is associated with a corresponding isolation type value, and when an access request of a user is detected, the isolation type value of the user is obtained, so that a matched isolation type is determined through the isolation type value, and a view associated with the isolation type is obtained.
In the technical solution provided in this embodiment, a view is created according to configuration information of the view, where the configuration information includes a view ID, a view name, and a dimension type, then a menu list displayed in the view is configured, where the menu list includes at least one menu, the menu is displayed in the view in a preset display manner, then an isolation type is determined according to the configuration information of the view, the isolation type is stored in association with the configured view, and when an access request of a user is detected, a step of obtaining an isolation type value corresponding to the user is performed, so that a matched isolation type is determined according to the isolation type value, a view associated with the isolation type is obtained, and a control effect of the view is improved by configuring a dynamic view.
Example III
Referring to fig. 6, in the third embodiment, after the step S10, the method further includes:
Step S90, when the target menu is detected to be triggered, acquiring role information of a logged-in user;
step S100, if the role information is matched with the target menu, determining and displaying a page associated with the target menu;
and S110, if not, displaying prompt information with insufficient permission.
In this embodiment, after the target view is presented in the interface, the user may click on the target menu that is desired to be viewed in the interface based on the selection device. After the user clicks the target menu, the view control system detects that the target menu is triggered, and at this time, the role information of the user is acquired. And judging whether the character information is matched with the target menu or not, namely judging whether the value in the character information is matched with the value of the target menu or not. And if so, displaying the page associated with the target menu in an interface of a user side of the user. Otherwise, the prompt information of the insufficient authority is fed back to the interface of the user side.
Optionally, in this embodiment, before step S90, the method further includes:
And storing the role information in association with the target menu so as to enable a user with the role information to have authority to access the target menu.
Specifically, the role module realizes the functions of creating and managing the role information, including definition of the role information and maintenance of the relationship between the role information and the view and menu, and the role information and the target menu are associated and stored to ensure that the user with the corresponding role can access the corresponding view by creating the role information and configuring the target menu to which the role information has authority to access. The role information can be associated with a plurality of users, and the users with the role information associated with the menu can access the data under the menu. For example, a "sales manager" role is created and associated with a "sales report" view. A user having a "sales manager" role can access the "sales report" view.
In the technical scheme provided by the embodiment, when the target menu is detected to be triggered, character information of a logged-in user is obtained, if the character information is matched with the target menu, a page associated with the target menu is determined and displayed, and otherwise, prompt information with insufficient permission is displayed. And authorizing the menu-associated data accessible to the user through the role information of the user, thereby improving the management effect of the menu in the view.
Example IV
Referring to fig. 7, in the third embodiment, after the step of step S30, the method further includes:
and step S120, after the user is detected to enter the target view, recording the clicking times of each target menu in the target view.
And step S130, sorting all the target menus according to the clicking times, and displaying the sorted target menus in the target view.
In this embodiment, after the user inputs the account password and the verification is successful, the user enters the target view, and at this time, the view control system detects that the user enters the target view. And then, a monitoring tool in the view control system records the clicking times of all the target menus in the target view in real time, automatically sorts the target menus according to the clicking times of all the target menus, and finally displays the sorted target menus in the target view. It will be appreciated that the manner in which the ordered target menu is presented in the target view may be by setting a timer in a view control system and setting a preset duration in the timer, and automatically refreshing the target view when the preset duration is reached, thereby presenting the ordered target menu in the target view. The ordered target menu can be displayed in the target view when the user exits or switches the view and reenters the target view.
In the technical solution provided in this embodiment, after detecting that a user enters the target view, the number of clicks of each target menu in the target view is recorded, then each target menu is ordered according to the number of clicks, and the ordered target menu is displayed in the target view, so that the layout of the menu in the target view can be adjusted according to the number of clicks of the user, thereby improving user experience.
Since the system described in the embodiments of the present application is a system used for implementing the method of the embodiments of the present application, based on the method described in the embodiments of the present application, a person skilled in the art can understand the specific structure and the modification of the system, and therefore, the description thereof is omitted herein. All systems used in the method of the embodiment of the application are within the scope of the application.
The application provides view control equipment which comprises at least one processor and a memory in communication connection with the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the view control method in the first embodiment.
Referring now to fig. 8, a schematic diagram of a view control device suitable for use in implementing embodiments of the present application is shown. The view control device in the embodiment of the present application may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (Personal DIGITAL ASSISTANT: personal digital assistant), a PAD (Portable Application Description: tablet), a PMP (Portable MEDIA PLAYER: portable multimedia player), an in-vehicle terminal (e.g., an in-vehicle navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like. The view control apparatus shown in fig. 8 is only one example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present application.
As shown in fig. 8, the view control apparatus may include a processing device 1001 (e.g., a core processor, a graphics processor, etc.) which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access Memory (RAM: random Access Memory) 1004. In the RAM1004, various programs and data necessary for the operation of the view control apparatus are also stored. The processing device 1001, the ROM1002, and the RAM1004 are connected to each other by a bus 1005. An input/output (I/O) interface 1006 is also connected to the bus. In general, a system including an input device 1007 such as a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc., an output device 1008 including a Liquid crystal display (LCD: liquid CRYSTAL DISPLAY), a speaker, a vibrator, etc., a storage device 1003 including a magnetic tape, a hard disk, etc., and a communication device 1009 may be connected to the I/O interface 1006. The communication means 1009 may allow the view control device to communicate wirelessly or by wire with other devices to exchange data. While a view control device having various systems is shown in the figures, it should be understood that not all of the illustrated systems are required to be implemented or provided. More or fewer systems may alternatively be implemented or provided.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through a communication device, or installed from the storage device 1003, or installed from the ROM 1002. The above-described functions defined in the method of the disclosed embodiment of the application are performed when the computer program is executed by the processing device 1001.
The view control device provided by the application can solve the technical problem that the flexibility of the related scheme to view authority management is low by adopting the view control method in the embodiment. Compared with the prior art, the beneficial effects of the view control device provided by the application are the same as those of the view control method provided by the embodiment, and other technical features of the view control device are the same as those disclosed by the method of the previous embodiment, and are not repeated here.
It is to be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof. In the description of the above embodiments, particular features, structures, materials, or characteristics may be combined in any suitable manner in any one or more embodiments or examples.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
The present application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon for performing the view control method in the above-described embodiments.
The computer readable storage medium provided by the present application may be, for example, a U disk, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, or device, or a combination of any of the foregoing. More specific examples of a computer-readable storage medium may include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access Memory (RAM: random Access Memory), a Read-Only Memory (ROM), an erasable programmable Read-Only Memory (EPROM: erasable Programmable Read Only Memory or flash Memory), an optical fiber, a portable compact disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this embodiment, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, or device. Program code embodied on a computer readable storage medium may be transmitted using any appropriate medium, including but not limited to electrical wiring, fiber optic cable, RF (Radio Frequency) and the like, or any suitable combination of the foregoing.
The above-mentioned computer-readable storage medium may be contained in the view control apparatus or may exist alone without being assembled into the view control apparatus.
The computer readable storage medium carries one or more programs, and when the one or more programs are executed by view control equipment, the view control equipment obtains an isolation type value corresponding to a user when detecting an access request of the user, determines a matched isolation type according to the isolation type value, and obtains a target view associated with the isolation type, wherein the number of the target views is at least one, obtains a target menu associated with the target view, determines a display mode of the target menu in the target view, and displays the target view in an interface when detecting that a corresponding control in the target view is triggered, and the target menu is arranged in the target view in the display mode.
Computer program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of remote computers, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN: local Area Network) or a wide area network (WAN: wide Area Network), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules involved in the embodiments of the present application may be implemented in software or in hardware. Wherein the name of the module does not constitute a limitation of the unit itself in some cases.
The readable storage medium provided by the application is a computer readable storage medium, and the computer readable storage medium stores computer readable program instructions (namely computer program) for executing the view control method, so that the technical problem that the flexibility of the related scheme to view authority management is low can be solved. Compared with the prior art, the beneficial effects of the computer readable storage medium provided by the application are the same as those of the view control method provided by the above embodiment, and are not described herein.
An embodiment of the application provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of a view control method as described above.
The computer program product provided by the application can solve the technical problem that the flexibility of the related scheme to view authority management is low. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of the present application are the same as those of the view control method provided by the above embodiment, and are not described herein.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the application, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein, or any application, directly or indirectly, within the scope of the application.

Claims (6)

1.一种视图控制方法,其特征在于,所述方法包括以下步骤:1. A view control method, characterized in that the method comprises the following steps: 获取视图的配置信息,根据所述配置信息创建视图,其中,所述配置信息包括视图ID、视图名称以及维度类型;Obtaining configuration information of a view, and creating a view according to the configuration information, wherein the configuration information includes a view ID, a view name, and a dimension type; 配置所述视图中展示的菜单列表,其中,所述菜单列表包含至少一个菜单,所述菜单以预设显示方式展示在所述视图中;Configuring a menu list displayed in the view, wherein the menu list includes at least one menu, and the menu is displayed in the view in a preset display mode; 根据所述视图的配置信息确定隔离类型,并将所述隔离类型与已配置好的所述视图关联保存;Determine an isolation type according to the configuration information of the view, and associate the isolation type with the configured view and save it; 获取已创建的角色信息以及第二菜单;Get the created role information and the second menu; 根据所述角色信息和所述第二菜单的关系建立对应的函数映射,并将所述角色信息、所述第二菜单以及所述函数映射保存至数据库中;Establishing a corresponding function mapping according to the relationship between the role information and the second menu, and saving the role information, the second menu and the function mapping in a database; 在检测到用户的访问请求时,获取所述访问请求中的用户信息;When detecting an access request from a user, obtaining user information in the access request; 若所述用户信息为新用户账号,根据所述用户信息,于数据库中查询用户对应的目标角色以及目标隔离类型值,并将所述目标角色以及所述目标隔离类型值反馈至所述用户对应的用户端,以使所述用户端在访问时生成携带有所述目标角色以及所述目标隔离类型值的访问请求;If the user information is a new user account, query the target role and target isolation type value corresponding to the user in the database according to the user information, and feed back the target role and the target isolation type value to the user terminal corresponding to the user, so that the user terminal generates an access request carrying the target role and the target isolation type value when accessing; 否则,执行获取所述用户对应的隔离类型值的步骤;Otherwise, executing the step of obtaining the isolation type value corresponding to the user; 获取所述用户对应的隔离类型值;Obtaining the isolation type value corresponding to the user; 根据所述隔离类型值确定匹配的隔离类型,并获取与所述隔离类型关联的目标视图,其中,所述目标视图至少为一个;Determine a matching isolation type according to the isolation type value, and obtain a target view associated with the isolation type, wherein the target view is at least one; 获取与所述目标视图关联的目标菜单,并确定所述目标菜单在所述目标视图中的显示方式,其中,所述目标菜单有预设的显示方式,所述目标菜单在所述目标视图中的显示方式,为所述目标菜单的控件在所述目标视图中的显示方式;Acquire a target menu associated with the target view, and determine a display mode of the target menu in the target view, wherein the target menu has a preset display mode, and the display mode of the target menu in the target view is the display mode of the controls of the target menu in the target view; 在检测到所述目标视图中对应的控件被触发时,将所述目标视图展示在界面中,其中,所述目标菜单以所述显示方式排列在所述目标视图中;When it is detected that the corresponding control in the target view is triggered, the target view is displayed in the interface, wherein the target menu is arranged in the target view in the display manner; 在检测到用户进入所述目标视图之后,记录所述目标视图中各个所述目标菜单的点击次数;After detecting that the user enters the target view, recording the number of clicks on each of the target menus in the target view; 根据所述点击次数将各所述目标菜单排序,并在所述目标视图中展示已排序的所述目标菜单。The target menus are sorted according to the number of clicks, and the sorted target menus are displayed in the target view. 2.如权利要求1所述的方法,其特征在于,所述在检测到所述目标视图中对应的控件被触发时,将所述目标视图展示在界面中的步骤之后,还包括:2. The method according to claim 1, characterized in that after the step of displaying the target view in the interface when detecting that the corresponding control in the target view is triggered, the method further comprises: 在检测到所述目标菜单被触发时,获取已登录用户的角色信息;When detecting that the target menu is triggered, obtaining the role information of the logged-in user; 若所述角色信息与所述目标菜单匹配,则确定并展示所述目标菜单关联的页面;If the role information matches the target menu, determining and displaying a page associated with the target menu; 否则,展示权限不足的提示信息。Otherwise, a prompt message indicating insufficient permissions is displayed. 3.如权利要求2所述的方法,其特征在于,所述在检测到所述目标菜单被触发时,获取已登录用户的角色信息的步骤之前,还包括:3. The method according to claim 2, characterized in that before the step of acquiring the role information of the logged-in user when the target menu is detected to be triggered, it also includes: 创建角色信息,并配置所述角色信息有权限访问的目标菜单;Create role information and configure the target menu that the role information has permission to access; 将所述角色信息与所述目标菜单关联保存,以使拥有所述角色信息的用户有权限访问所述目标菜单。The role information is associated with the target menu and saved so that a user who has the role information has the authority to access the target menu. 4.如权利要求1所述的方法,其特征在于,所述将所述目标视图展示在界面中的步骤之后,还包括:4. The method according to claim 1, characterized in that after the step of displaying the target view in the interface, it also includes: 在检测到用户点击第一菜单时,验证用户的角色是否有权限访问所述第一菜单;When detecting that the user clicks on the first menu, verifying whether the user's role has the authority to access the first menu; 若有权限,则跳转至相应的页面,若没有权限,则禁止用户访问并反馈相应的提示。If the permission is granted, the user will be redirected to the corresponding page. If the permission is not granted, the user will be prohibited from accessing the page and a corresponding prompt will be given. 5.一种视图控制设备,其特征在于,所述视图控制设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序配置为实现如权利要求1至4任一项所述的视图控制方法的步骤。5. A view control device, characterized in that the view control device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the view control method according to any one of claims 1 to 4. 6.一种存储介质,其特征在于,所述存储介质为计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至4任一项所述的视图控制方法的步骤。6. A storage medium, characterized in that the storage medium is a computer-readable storage medium, and a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the view control method according to any one of claims 1 to 4 are implemented.
CN202411390821.0A 2024-10-08 2024-10-08 View control method, device and storage medium Active CN118897708B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411390821.0A CN118897708B (en) 2024-10-08 2024-10-08 View control method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411390821.0A CN118897708B (en) 2024-10-08 2024-10-08 View control method, device and storage medium

Publications (2)

Publication Number Publication Date
CN118897708A CN118897708A (en) 2024-11-05
CN118897708B true CN118897708B (en) 2025-03-21

Family

ID=93266979

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411390821.0A Active CN118897708B (en) 2024-10-08 2024-10-08 View control method, device and storage medium

Country Status (1)

Country Link
CN (1) CN118897708B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114518924A (en) * 2022-01-29 2022-05-20 苏州达家迎信息技术有限公司 Page display method, device, equipment and storage medium for mobile client
CN114969834A (en) * 2022-07-29 2022-08-30 广州市千钧网络科技有限公司 Page authority control method and device, storage medium and equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007028160A2 (en) * 2005-09-02 2007-03-08 Gary Durbin Database system and method for access control and workflow routing
CN109145539A (en) * 2018-08-22 2019-01-04 深圳点猫科技有限公司 A kind of right management method and electronic equipment of more programming projects
CN110287709B (en) * 2019-05-22 2023-04-28 深圳壹账通智能科技有限公司 User operation authority control method, device, equipment and medium
CN112835490A (en) * 2021-02-24 2021-05-25 北京金山云网络技术有限公司 Menu display method and device, client device and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114518924A (en) * 2022-01-29 2022-05-20 苏州达家迎信息技术有限公司 Page display method, device, equipment and storage medium for mobile client
CN114969834A (en) * 2022-07-29 2022-08-30 广州市千钧网络科技有限公司 Page authority control method and device, storage medium and equipment

Also Published As

Publication number Publication date
CN118897708A (en) 2024-11-05

Similar Documents

Publication Publication Date Title
US9773102B2 (en) Selective file access for applications
US8935755B1 (en) Managing permissions and capabilities of web applications and browser extensions based on install location
MX2014007792A (en) File system access for one or more sandboxed applications.
CN107341016B (en) Focus state implementation method and device under split screen mechanism, terminal and storage medium
US20120159566A1 (en) Access control framework
CN111079125A (en) Method and device for calling third-party library dynamic lifting authority by application program
JP2020504356A (en) Payment application separation method and device, and terminal
CN111177732B (en) System debugging mode control method and system and electronic equipment
CN107729768B (en) Page display method and device, intelligent panel and storage medium
US9268782B2 (en) Re-use of binaries for multiple user accounts
CN110084035B (en) Electronic device and method for suggesting a response guide when a rejection occurs
CN111143089A (en) Method and device for calling third-party library dynamic lifting authority by application program
CN118897708B (en) View control method, device and storage medium
CN112528249A (en) Authority management method and device suitable for network security management platform
WO2025020678A1 (en) Permission configuration method and apparatus, and electronic device
CN111310175A (en) iOS application safety monitoring and protecting method and device based on plug-in
CN110263006A (en) A kind of method and apparatus for downloading file on a user device
CN117061305A (en) Interaction method, device, equipment, medium and program product of scene service
WO2023246390A1 (en) Data processing method and apparatus
US20090249442A1 (en) Enabling selected command access
CN110851185A (en) Automatic configuration method and device for equipment, electronic equipment and storage medium
CN111026542A (en) Display method and device of overlay icon of application program
US12118126B2 (en) Simplified user management functionality
CN119989388A (en) Permission verification method, filter, front-end server and storage medium
KR102100379B1 (en) Method for managing web history and device using the same

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