CN113254007B - zTree-based company organization dragging self-building organization method - Google Patents
zTree-based company organization dragging self-building organization method Download PDFInfo
- Publication number
- CN113254007B CN113254007B CN202110643124.1A CN202110643124A CN113254007B CN 113254007 B CN113254007 B CN 113254007B CN 202110643124 A CN202110643124 A CN 202110643124A CN 113254007 B CN113254007 B CN 113254007B
- Authority
- CN
- China
- Prior art keywords
- organization
- self
- company
- tree
- dragging
- 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
Links
- 230000008520 organization Effects 0.000 title claims abstract description 105
- 238000000034 method Methods 0.000 title claims abstract description 37
- 230000008569 process Effects 0.000 claims description 5
- 238000004806 packaging method and process Methods 0.000 claims description 3
- 238000012423 maintenance Methods 0.000 description 5
- 230000008901 benefit Effects 0.000 description 4
- 230000004044 response Effects 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- VYZAMTAEIAYCRO-UHFFFAOYSA-N Chromium Chemical compound [Cr] VYZAMTAEIAYCRO-UHFFFAOYSA-N 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000005538 encapsulation Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/34—Graphical or visual programming
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
- G06F3/04845—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The invention relates to a zTree-based company tissue dragging self-building organization method, which comprises the following steps: s1, calling a drag function interface of a display organization, inquiring a company organization tree and a self-built organization tree, and returning to a drag function page; s2, invoking zTree to initialize and render a page, wherein the left side of the page is set as a self-organized tree, the middle of the page is set as a company organized tree, and the right side of the page is set as organization information of the self-organized tree; s3, inquiring the tree structure of the self-organized tree and the tree structure of the group-organized tree, loading and initializing the self-organized tree and the group-organized tree, and dragging the company organization in the middle of the page into the self-organized tree; s4, clicking a self-built tree on the left side of the page to maintain the selected company; s5, if the company organization cannot drag to the top node of the self-built organization, building an external node; s6, the company organization is dragged to the self-built organization, if the organization is found to exist, prompt information is displayed, and the self-built organization rolls back.
Description
Technical Field
The invention relates to a zTree-based company organization dragging self-building organization method, and relates to the field of software technology development.
Background
zTree is a "tree plugin" implemented by means of jQuery. The combination of excellent performance, flexible configuration, multiple functions is the greatest advantage of zTree. And the method is compatible with IE, fireFox, chrome and other browsers, and has the characteristics of being capable of simultaneously generating a plurality of Tree examples in one page, supporting JSON data, supporting two modes of one-time static generation and Ajax asynchronous loading, supporting various event responses and feedback, supporting node movement, editing and deleting of the Tree, supporting optional replacement of skin/personalized icons (depending on css), supporting extremely flexible checkbox or radio selection functions, realizing flexible and changeable functions by simple parameter configuration and the like.
Along with the development of enterprises, in order to facilitate the work of each department in the enterprises, a department office business scene is formed into a system, so that the department office efficiency is improved. If the system is used by only 10 companies, a plurality of companies using the original organization tree 100 of the enterprise can generate load on the system, useless data is generated for the system, other company organizations are also required to be maintained, and a plurality of operation and maintenance works are added.
In the existing enterprise system, maintenance self-built organization can only use manual entry and script refreshing database, and illegal operation is not recommended to be adopted if the script refreshing database is always adopted in a formal environment. Moreover, when manual recording is adopted, the problems of few recordings, multiple recordings, data errors and the like exist, so that the problems are not corresponding to the data in the original organization tree.
Disclosure of Invention
Aiming at the problems, the invention aims to provide a zTree-based company organization dragging self-organizing method capable of maintaining the accuracy of data and reducing the maintenance cost.
In order to achieve the above purpose, the present invention adopts the following technical scheme:
a zTree-based company organization dragging self-building organization method is characterized by comprising the following steps:
s1, calling a drag function interface of a display organization, inquiring a company organization tree and a self-built organization tree, and returning to a drag function page;
s2, invoking zTree to initialize and render a page, wherein the left side of the page is set as a self-organized tree, the middle of the page is set as a company organized tree, and the right side of the page is set as organization information of the self-organized tree;
s3, inquiring the tree structure of the self-organized tree and the tree structure of the group-organized tree, loading and initializing the self-organized tree and the group-organized tree, and dragging the company organization in the middle of the page into the self-organized tree;
s4, clicking a self-built tree on the left side of the page to maintain the selected company;
s5, if the company organization cannot drag to the top node of the self-built organization, building an external node;
s6, the company organization is dragged to the self-built organization, if the organization is found to exist, prompt information is displayed, and the self-built organization rolls back.
The zTree-based company organization dragging self-building organization method further comprises the step that the self-building organization dragging page refers to js tree controls of the zTree.
The zTree-based company organization dragging self-building organization method further comprises the step of modifying and/or adding the organization social unified credit codes.
The zTree-based company organization dragging self-organizing method further comprises the steps that dragging companies recursively to departments comprises splicing secondary companies and tertiary companies into an array, the storage method is called to store all company and department information into the self-organizing tree in batches, the zTree packaging method is called to process whether the company and the department information is dragged or not when the company and the department information are dragged, all departments under the recursively dragging companies store into the self-organizing tree when the company and the department information are agreed to be dragged, and the reason is prompted when the company and the department information are not agreed to be dragged.
The zTree-based company organization dragging self-organizing method further carries out authority management according to a shiro authority framework through self-organizing dragging management.
Due to the adoption of the technical scheme, the invention has the following advantages:
1. the invention is based on the original company organization data, and independently maintains the company organization using the system, thereby not only maintaining the accuracy of the data and reducing the maintenance cost, but also ensuring that the system interface is concise and convenient;
2. after the self-built organization dragging function is realized, the query speed is greatly improved when the organization management and the related organization are used for querying sql, so that the system response is faster;
3. when the method and the system are used, if the company is required to be added, the newly added company can be maintained only by dragging the newly added company to the self-built organization in the self-built organization function, and compared with the maintenance of all group organizations, the system angle and the user experience angle are greatly improved.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Like parts are designated with like reference numerals throughout the drawings. In the drawings:
fig. 1 is a schematic diagram of a self-organizing drag service deployment principle according to an embodiment of the present invention;
FIG. 2 is a flow chart of a self-organizing drag service according to an embodiment of the present invention;
FIG. 3 is an example of the organization addition of an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention 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 invention to those skilled in the art.
It is to be understood that the terminology used herein is for the purpose of describing particular example embodiments only, and is not intended to be limiting. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. The terms "comprises," "comprising," "includes," "including," and "having" are inclusive and therefore specify the presence of stated features, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and/or groups thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring their performance in the particular order described or illustrated, unless an order of performance is explicitly stated. It should also be appreciated that additional or alternative steps may be used.
For ease of description, spatially relative terms, such as "inner," "outer," "lower," "upper," and the like, may be used herein to describe one element or feature's relationship to another element or feature as illustrated in the figures. Such spatially relative terms are intended to encompass different orientations of the device in use or operation in addition to the orientation depicted in the figures.
The invention solves the problem of self-organized organization in the system by the zTree of the open source, and the function comprises the encapsulation of the functions of the father node recursion child nodes: for example, a company is dragged into a self-organized tree to inquire a secondary company and a tertiary company under the company until the company is recursively divided, and the system is used for a user to drag the company organization and the company under the company to drag into the self-organized tree together, so that the problems of manual entry of small records, multiple records, data errors and the like are avoided.
The self-building organization method for company organization dragging based on zTree can operate a self-used organization tree of a group organization dragging system, and the core is the use of JS components and zTree plug-ins, and the call of a user is connected with the self-building organization through the system function, so that the whole realization principle is shown in figure 1:
the business system refers to zTree plugins provided by the dragging service;
the service system calls a plug-in function, and the plug-in function is transmitted into a method in the service system JS to serve as a calling method for transmitting a data result;
the system service calls the self-organized drag to process, and calls the storage service to store.
And calling a method in the service system JS in a callback mode, and returning a data result.
Based on the above principle, the zTree-based company organization dragging self-building organization method provided by the embodiment comprises the following specific processes:
1. and calling a display organization drag function interface, inquiring a company organization tree and a self-built organization tree, and returning a drag function page, wherein the self-built organization drag page refers to js of zTree.
2. As shown in fig. 2, the zTree is called to initialize the rendering page, the left side is a self-organizing tree, the middle is a company organizing tree (SAP organizing tree), and the right side is detailed information of the self-organizing tree.
Further, organizing the information includes modifying and/or adding an organization's social unifying credit code, which is data that is not present in the corporate organizational tree.
3. Inquiring the tree structure of the self-organized tree and the tree structure of the group-organized tree, loading and initializing the self-organized tree and the group-organized tree, and dragging the middle company organization into the self-organized organization.
Specifically, the recursive to departments of the dragged company comprises splicing the three-level company of the second-level company into an array (each company and department are packaged into an object, all the objects are put into an array), the storage method is called to store all the company and department information in batches into a self-organizing tree, the tree structure of the company organization is reserved, when the company organization is dragged (a company in the dragging selected company organization is always left-clicked and moves a mouse into the self-organizing tree), the method such as beforeDrop, onDrop in the zTree packaging method is called to treat whether the company is dragged or not, when the company and the department are agreed to be dragged, all the departments under the company are recursively dragged to the self-organizing tree, and when the company and the department are not agreed to be dragged, the reason is prompted.
As shown in fig. 3, the container 1 page requests the container 2 system action to display the self-built organization and the group organization back to the container 1 page, the group organization is dragged to the self-built organization in the container 1 page, the new modification interface of the container 4 system action is called, the data is saved to the container 3 database MySql, and if redundant departments exist in the self-built organization of the container 1 page, the redundant departments can be deleted and saved to the container 3 database MySql.
And (3) the system calls the page, and interacts with the system service through js after the page is dragged, and the system service sends the data CRUD (adding, deleting and modifying) to the storage service.
4. Clicking the left self-built organization tree, maintaining the selected company, clicking the save and call save method, and modifying the original data of the company with the maintained information.
Specifically, maintaining selected companies includes information in the corporate organizational tree failing to meet system requirements, fields may be added, such as: the society of the company unifies information such as credit codes.
5. The corporate organization cannot drag to the top level node of the self-built organization, the self-built external node.
6. The company organization is dragged into the self-built organization, and if the organization is found to exist, prompt information is displayed and rolled back.
According to the preferred embodiment of the invention, the self-organizing drag management function can carry out authority management according to the shiro authority framework, and only a character with the function can see the function, for example, the existing character A and the character B are two characters, wherein the character A is provided with a menu of self-organizing drag, the character B is not provided, if the user is provided with the character B, the user interface is provided with the menu of no self-organizing drag, and when the user is provided with the character A, the user can check and operate the menu of self-organizing drag, so that disorder of organization data is prevented, and a series of problems caused by organization of a system are avoided.
In summary, the method and the system greatly improve the query speed when using the organization management and the associated organization to query sql, so that the system response is faster, the user experience is improved, and the organization and the data of the system are more convenient to maintain.
Finally, it should be noted that the above embodiments are merely illustrative of the technical solution of the present invention, and not limiting thereof; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may be modified or some technical features may be replaced with other technical solutions, which may not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims (5)
1. A zTree-based company organization dragging self-building organization method is characterized by comprising the following steps:
s1, calling a drag function interface of a display organization, inquiring a company organization tree and a self-built organization tree, and returning to a drag function page;
s2, invoking zTree to initialize and render a page, wherein the left side of the page is set as a self-organized tree, the middle of the page is set as a company organized tree, and the right side of the page is set as organization information of the self-organized tree;
s3, inquiring the tree structure of the self-organized tree and the tree structure of the group-organized tree, loading and initializing the self-organized tree and the group-organized tree, and dragging the company organization in the middle of the page into the self-organized tree;
s4, clicking a self-built tree on the left side of the page to maintain the selected company;
s5, if the company organization cannot drag to the top node of the self-built organization, building an external node;
s6, the company organization is dragged to the self-built organization, if the organization is found to exist, prompt information is displayed, and the self-built organization rolls back.
2. The zTree-based company organization dragging self-organizing method according to claim 1, wherein the self-organizing dragging page refers to js tree control of zTree.
3. The zTree-based company organization dragging self-organizing method according to claim 1, wherein the organization information comprises social unifying credit codes of the modified and/or added organization.
4. The zTree-based company organization dragging self-organizing method according to claim 1, wherein dragging the company recursion to the departments comprises splicing the secondary company three-level companies into an array, calling a saving method to save all company and department information into the self-organizing tree in batches, calling a zTree packaging method to process whether to drag the company or not when dragging, and recursively dragging all departments under the company to save the company to the self-organizing tree when dragging is agreed, and prompting reasons when dragging is not agreed.
5. The zTree-based company organization dragging self-organizing method according to any one of claims 1 to 4, wherein self-organizing dragging management performs authority management according to a shiro authority framework.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110643124.1A CN113254007B (en) | 2021-06-09 | 2021-06-09 | zTree-based company organization dragging self-building organization method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110643124.1A CN113254007B (en) | 2021-06-09 | 2021-06-09 | zTree-based company organization dragging self-building organization method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113254007A CN113254007A (en) | 2021-08-13 |
CN113254007B true CN113254007B (en) | 2024-01-12 |
Family
ID=77187382
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110643124.1A Active CN113254007B (en) | 2021-06-09 | 2021-06-09 | zTree-based company organization dragging self-building organization method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113254007B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109408699A (en) * | 2018-09-14 | 2019-03-01 | 厦门天锐科技股份有限公司 | A kind of method that synchronization caching zTree tree realizes tree node quick-searching |
KR101974803B1 (en) * | 2018-12-13 | 2019-05-03 | 공명현 | Method and system for visualizing company organizational chart |
CN110286908A (en) * | 2019-07-01 | 2019-09-27 | 广州凡科互联网科技股份有限公司 | A method of based on control formula customizing form |
-
2021
- 2021-06-09 CN CN202110643124.1A patent/CN113254007B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109408699A (en) * | 2018-09-14 | 2019-03-01 | 厦门天锐科技股份有限公司 | A kind of method that synchronization caching zTree tree realizes tree node quick-searching |
KR101974803B1 (en) * | 2018-12-13 | 2019-05-03 | 공명현 | Method and system for visualizing company organizational chart |
CN110286908A (en) * | 2019-07-01 | 2019-09-27 | 广州凡科互联网科技股份有限公司 | A method of based on control formula customizing form |
Non-Patent Citations (2)
Title |
---|
基于B/S架构的多媒体资源管理模块;夏婧;张忠能;;微型电脑应用(11);全文 * |
基于递归算法的树型结构图的设计与实现;魏斌;马继辉;牛虎;;计算机应用与软件(01);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN113254007A (en) | 2021-08-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11599663B2 (en) | Computer-implemented methods, systems comprising computer-readable media, and electronic devices for completing queries propagated across a plurality of datasources | |
US10437584B2 (en) | Web client command infrastructure integration into a rich client application | |
KR101368068B1 (en) | Method of constructing database, server performing the same and storage media storing the same | |
CN102999537A (en) | System and method for data migration | |
CN105487864A (en) | Method and device for automatically generating code | |
US11475386B2 (en) | Electronic message management program coordinating defined activity and controlled recipient/respondents through a unique id | |
CN109657103A (en) | Conversion method, device, computer equipment and the storage medium of data structure | |
CN107908680A (en) | Management method, electronic device and the computer-readable recording medium of wechat public platform | |
CN110888736A (en) | Application management method and system based on container cloud platform and related components | |
CN112182349A (en) | Method, device and system for querying compliance file | |
CN101706823B (en) | Inquiry system and method of customized database | |
CN113254007B (en) | zTree-based company organization dragging self-building organization method | |
US20120079413A1 (en) | Dynamic, set driven, ribbon, supporting deep merge | |
CN112686580A (en) | Workflow definition method and system capable of customizing flow | |
CN103561113A (en) | Web Service interface generating method and device | |
CN101794223A (en) | Design method of WADE service message architecture | |
CN104699477A (en) | Near field communication based data transfer | |
CN116033002A (en) | Service field configuration method, device, equipment and readable storage medium | |
CN112907013A (en) | Executor selection method based on custom circulation | |
Wieland et al. | Context model for representation of business process management artifacts | |
CN109460217A (en) | Ticket reselling website background management system framework | |
CN112051987B (en) | Service data processing method, device and equipment, program generating method and device | |
CN116578793B (en) | Front-end page design method and system | |
Guojie et al. | Enhancing software reuse through application-level component approach | |
CN101989280A (en) | Method and system for managing configuration resources |
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 |