CN113254007A - zTree-based company organization dragging self-building organization method - Google Patents

zTree-based company organization dragging self-building organization method Download PDF

Info

Publication number
CN113254007A
CN113254007A CN202110643124.1A CN202110643124A CN113254007A CN 113254007 A CN113254007 A CN 113254007A CN 202110643124 A CN202110643124 A CN 202110643124A CN 113254007 A CN113254007 A CN 113254007A
Authority
CN
China
Prior art keywords
organization
self
company
dragging
tree
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.)
Granted
Application number
CN202110643124.1A
Other languages
Chinese (zh)
Other versions
CN113254007B (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.)
CRSC Institute of Smart City Research and Design Co Ltd
Original Assignee
CRSC Institute of Smart City Research and Design 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 CRSC Institute of Smart City Research and Design Co Ltd filed Critical CRSC Institute of Smart City Research and Design Co Ltd
Priority to CN202110643124.1A priority Critical patent/CN113254007B/en
Publication of CN113254007A publication Critical patent/CN113254007A/en
Application granted granted Critical
Publication of CN113254007B publication Critical patent/CN113254007B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • 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/0484Interaction 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/04845Interaction 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 organization dragging self-building organization method, which comprises the following steps: s1, calling a display organization dragging function interface, inquiring a company organization tree and a self-built organization tree, and returning to a dragging function page; s2, calling zTree to initialize a rendering page, setting the left side of the page as a self-building organization tree, setting the middle of the page as a company organization tree, and setting the right side of the page as organization information of the self-building organization tree; s3, inquiring the self-built organization tree structure and the clustering organization tree structure, loading the initialized self-built organization tree and the clustering organization tree, and dragging the company organization in the middle of the page into the self-built organization; s4, clicking the self-built organization tree on the left side of the page to maintain the selected company; s5, if the company organization can not be dragged to the top node of the self-building organization, building an external node; s6, the company organization pulls to the self-built organization, if the organization is found to exist, the prompt message is displayed and the self-built organization rolls back.

Description

zTree-based company organization dragging self-building organization method
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 plug-in" that relies on jQuery implementations. Superior performance, flexible configuration, combination of multiple functions are the greatest advantages of zTree. The method is compatible with browsers such as IE, FireFox, Chrome and the like, can simultaneously generate a plurality of Tree instances in one page, supports JSON data, supports two modes of one-time static generation and Ajax asynchronous loading, supports various event responses and feedbacks, supports node movement, editing and deleting of the Trees, supports random skin/personalized icon replacement (depending on css), supports extremely flexible checkbox or radio selection function, and realizes flexible and variable function by simple parameter configuration.
With the development of enterprises, in order to facilitate the work of each department in the enterprise, the office business scenes of the departments are formed into a system, so that the office efficiency of the departments is improved. If the system is used by only 10 companies, then the system is burdened by more companies using the original organization tree 100 of the enterprise, which results in useless data for the system and also needs to maintain other company organizations, increasing a lot of operation and maintenance work.
In the existing enterprise system, the maintenance self-organization can only adopt manual entry and script refreshing of the database, and the database is not suggested to be adopted if the script refreshing of the database is always adopted in the formal environment. Moreover, when manual recording is adopted, the problems of less recording, more recording, data errors and the like exist, so that the problems are not corresponding to the data in the original organization tree.
Disclosure of Invention
In view of the above problems, an object of the present invention is to provide a zTree-based company organization drag and self-organization method capable of maintaining data accuracy and reducing maintenance cost.
In order to achieve the purpose, the invention adopts the following technical scheme:
a company organization dragging self-building organization method based on zTree is characterized by comprising the following steps:
s1, calling a display organization dragging function interface, inquiring a company organization tree and a self-built organization tree, and returning to a dragging function page;
s2, calling zTree to initialize a rendering page, setting the left side of the page as a self-building organization tree, setting the middle of the page as a company organization tree, and setting the right side of the page as organization information of the self-building organization tree;
s3, inquiring the self-built organization tree structure and the clustering organization tree structure, loading the initialized self-built organization tree and the clustering organization tree, and dragging the company organization in the middle of the page into the self-built organization;
s4, clicking the self-built organization tree on the left side of the page to maintain the selected company;
s5, if the company organization can not be dragged to the top node of the self-building organization, building an external node;
s6, the company organization pulls to the self-built organization, if the organization is found to exist, the prompt message is displayed and the self-built organization rolls back.
The zTree-based company organization dragging self-building organization method is characterized in that a self-building organization dragging page refers to js tree control of the zTree.
The zTree-based company organization dragging and self-building organization method further comprises the step of organizing information including social uniform credit codes of the organization are modified and/or added.
The zTree-based company organization dragging self-building organization method further comprises the steps that dragging companies to the departments in a recursion mode comprises splicing of three-level companies of a second-level company into an array, a storage method is called to store all company and department information in batches into a self-building organization tree, a zTree encapsulation method is called to process whether the company is dragged or not when dragging is carried out, all departments under the company are stored into the self-building organization tree in a recursion dragging mode if dragging is agreed, and reasons are prompted if dragging is not agreed.
The zTree-based company organization dragging self-building organization method is characterized in that further, self-building organization dragging management is conducted according to a shiro authority framework for authority management.
Due to the adoption of the technical scheme, the invention has the following advantages:
1. the invention takes the original company organization data as the basis, and the company organization using the system is maintained independently, thereby not only maintaining the accuracy of the data and reducing the maintenance cost, but also leading the system interface to be simple and convenient;
2. after the self-built organization dragging function is realized, the query speed can be greatly improved when the organization management and the associated organization query sql is used, and the system response is further faster;
3. when the method and the system are used and companies need to be added, the newly added companies can be maintained only by dragging the newly added companies to the self-organization in the self-organization function, and compared with the maintenance of all group organizations, the method and the system are greatly improved in system angle and user experience angle.
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 reference numerals refer to like parts throughout the drawings. In the drawings:
fig. 1 is a schematic diagram illustrating a deployment principle of a self-organizing dragging service according to an embodiment of the present invention;
FIG. 2 is a flow chart of a self-organizing drag-and-drop service according to an embodiment of the present invention;
FIG. 3 is an example of organization additions according to 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 invention are shown in the drawings, it should be understood that the invention can 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" may be intended to include the plural forms as well, unless the context clearly indicates otherwise. The terms "comprises," "comprising," "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 specifically identified as an order of performance. It should also be understood that additional or alternative steps may be used.
For convenience 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 problems of self-building organization in the system through open-source zTree, and the function comprises the encapsulation of the recursion child node function of a father node: for example, dragging a company to the self-built organization tree can inquire a second-level company and a third-level company under the company until the company recurses to a department, and the system is provided for a user to drag the company organization and drag the company organization together with the lower department of the company to the self-built organization tree, so that the problems of less records, more records, data errors and the like of manual input are avoided.
The zTree-based company organization dragging self-building organization method provided by the invention can operate a self-used organization tree of a group organization dragging system, has the core of using a JS component and a zTree plug-in component, links the calling of a user with the self-building organization through the system function, and has the whole realization principle as shown in figure 1:
the business system refers to a zTree plug-in provided by the dragging service;
the service system calls a plug-in function, and transmits a method in the service system JS as a calling method for transmitting a data result;
the system service calls self-built organization drag to process, and calls the storage service to store.
And calling the method in the service system JS in a callback mode, and returning a data result.
Based on the principle, the organization dragging self-building organization method based on zTree provided by the embodiment includes the following specific processes:
1. and calling a display organization dragging function interface, inquiring the company organization tree and the self-built organization tree, returning a dragging function page, and referring js of the zTree by the self-built organization dragging page.
2. As shown in fig. 2, the zTree is called to initialize the rendering page, the self-organizing tree is on the left, the company organizing tree (SAP organizing tree) is in the middle, and the detailed information of the self-organizing tree is on the right.
Further, the organization information includes modifying and/or adding an organization social uniform credit code, the social uniform credit code being data that is not present in the corporate organization tree.
3. And inquiring the tree structures of the self-built organization tree and the clustered organization tree, loading the initialized self-built organization tree and the clustered organization tree, and dragging the middle company organization into the self-built organization.
Specifically, the method includes that dragged companies recur to departments and include a second-level company and a third-level company which are spliced into an array (each company and each department are packaged into an object, all the objects are placed into the array), a storage method is called to store all company and department information into a self-built organization tree in batches, the tree structure of the company organization is reserved, when dragging is carried out (a certain company in the company organization is dragged and selected, a left button is always clicked and a mouse is moved into the self-built organization tree), methods such as beforeDrop and onDrop in a zTree packaging method are called to process whether the dragging is carried out or not, if dragging is agreed, all the departments under the company are recursively dragged and stored into the self-built organization tree, and if not, reasons are prompted.
As shown in fig. 3, the container 1 page requests the container 2 system action to display the self-organization and the group organization back to the container 1 page, the group organization is dragged to the self-organization in the container 1 page to call a new modification interface of the container 4 system action, and the data is stored in the container 3 database MySql, and if there are redundant departments in the container 1 page self-organization, the redundant departments can be deleted and stored in the container 3 database MySql.
And the system calls a page, interacts with the system service through js after page operation and dragging, and then the system service transmits the data CRUD (adding, deleting, modifying and checking) to the storage service.
4. Clicking the left self-built organization tree to maintain the selected company, clicking the storage and calling storage method to modify the maintained information into the original data of the company.
Specifically, the maintenance of the selected company includes that the information in the company organization tree cannot meet the system requirements, and fields may be added, for example: the society of the company unifies information such as credit codes.
5. The company organization cannot drag to the top-level node of the self-building organization, and the external node is built by itself.
6. The corporate organization pulls into the self-organizing organization and if the organization is found to be already present, a prompt is displayed and rolled back.
According to a preferred embodiment of the invention, the self-organized dragging management function can perform authority management according to a shiro authority framework, and only the role with the function can see the function, for example, the existing role A and the role B have two roles, the role A has a menu dragged by the self-organized organization, the role B does not exist, if the user has the role B, the user does not have the menu dragged by the self-organized organization on a user interface, when the user has the role A, the user can view the menu dragged by the self-organized organization and operate the menu dragged by the self-organized organization, and the disorder of the organization data is prevented so as to avoid a series of problems caused by the organization of the system.
In summary, the invention can greatly improve the query speed when using the organization management and the associated organization to query sql, so as to make the system response faster, improve the user experience, and more conveniently maintain the organization and the data of the system.
Finally, it should be noted that the above embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present 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: it is to be understood that modifications may be made to the above-described arrangements in the embodiments or equivalents may be substituted for some of the features of the embodiments without departing from the spirit or scope of the present invention.

Claims (5)

1. A company organization dragging self-building organization method based on zTree is characterized by comprising the following steps:
s1, calling a display organization dragging function interface, inquiring a company organization tree and a self-built organization tree, and returning to a dragging function page;
s2, calling zTree to initialize a rendering page, setting the left side of the page as a self-building organization tree, setting the middle of the page as a company organization tree, and setting the right side of the page as organization information of the self-building organization tree;
s3, inquiring the self-built organization tree structure and the clustering organization tree structure, loading the initialized self-built organization tree and the clustering organization tree, and dragging the company organization in the middle of the page into the self-built organization;
s4, clicking the self-built organization tree on the left side of the page to maintain the selected company;
s5, if the company organization can not be dragged to the top node of the self-building organization, building an external node;
s6, the company organization pulls to the self-built organization, if the organization is found to exist, the prompt message is displayed and the self-built organization rolls back.
2. The zTree-based corporate organization dragging self-organization method according to claim 1, wherein a zTree js tree control of zTree is referenced by a self-organization dragging page.
3. The zTree-based corporate organization dragging self-organizing method according to claim 1, wherein organizing information comprises modifying and/or adding social uniform credit codes for an organization.
4. The zTree-based company organization dragging self-organization method according to claim 1, wherein dragging companies to departments recursively comprises splicing three-level companies of a second-level company into arrays, calling a storage method to store all company and department information in batches into a self-organization tree, calling a zTree encapsulation method to process whether the zTree is dragged or not during dragging, if dragging is agreed, all departments of the recursively dragged company are stored into the self-organization tree, and if not, a reason is prompted.
5. The zTree-based company organization dragging self-organization method according to any one of claims 1 to 4, wherein self-organization dragging management is performed according to a shiro authority framework.
CN202110643124.1A 2021-06-09 2021-06-09 zTree-based company organization dragging self-building organization method Active CN113254007B (en)

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 true CN113254007A (en) 2021-08-13
CN113254007B 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)

* Cited by examiner, † Cited by third party
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

Patent Citations (3)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
Title
夏婧;张忠能;: "基于B/S架构的多媒体资源管理模块", 微型电脑应用, no. 11 *
魏斌;马继辉;牛虎;: "基于递归算法的树型结构图的设计与实现", 计算机应用与软件, no. 01 *

Also Published As

Publication number Publication date
CN113254007B (en) 2024-01-12

Similar Documents

Publication Publication Date Title
CN112036736B (en) Workflow creation method and device
CN108647883B (en) Business approval method, device, equipment and medium
US20160110190A1 (en) Web Client Command Infrastructure Integration into a Rich Client Application
US11475386B2 (en) Electronic message management program coordinating defined activity and controlled recipient/respondents through a unique id
CN107908680A (en) Management method, electronic device and the computer-readable recording medium of wechat public platform
CN105930330A (en) Portal system page display method and apparatus
US20140229222A1 (en) Integrated project planning and management application
CN105184145A (en) Permission management method and management apparatus
CN105205757A (en) Android-based elective system
WO2019062673A1 (en) Information-based management implementation method and system based on input and output semantization
US20230102947A1 (en) Providing operations in accordance with worksheet relationships and data object relationships
CN110083664B (en) Method for automatically constructing topological model based on CMDB model
CN110889272A (en) Data processing method, device, equipment and storage medium
CN106021359A (en) CAD file modification method and device
CN111368353B (en) CAD drawing die turning method, system, device and storage medium
CN110889013B (en) Data association method, device, server and storage medium based on XML
CN113254007A (en) zTree-based company organization dragging self-building organization method
CN104699477A (en) Near field communication based data transfer
CN116033002A (en) Service field configuration method, device, equipment and readable storage medium
CN115658658A (en) Batch processing-based data sharing method and device for enterprise data middleboxes and storage medium
US11699115B2 (en) System and method for modular customization of intermediate business documentation generation
CN114895875A (en) Zero-code visual information system metadata production application method and system
CN112907013A (en) Executor selection method based on custom circulation
CN107844639B (en) Project standard structure automatic generation method and system
CN112051987B (en) Service data processing method, device and equipment, program generating method and device

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