CN102143209A - Graph showing method, graph showing device and server - Google Patents

Graph showing method, graph showing device and server Download PDF

Info

Publication number
CN102143209A
CN102143209A CN2010106164420A CN201010616442A CN102143209A CN 102143209 A CN102143209 A CN 102143209A CN 2010106164420 A CN2010106164420 A CN 2010106164420A CN 201010616442 A CN201010616442 A CN 201010616442A CN 102143209 A CN102143209 A CN 102143209A
Authority
CN
China
Prior art keywords
word
picture
server end
browser
structural information
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.)
Pending
Application number
CN2010106164420A
Other languages
Chinese (zh)
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.)
Yonyou Software Co Ltd
Original Assignee
Yonyou Software 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 Yonyou Software Co Ltd filed Critical Yonyou Software Co Ltd
Priority to CN2010106164420A priority Critical patent/CN102143209A/en
Publication of CN102143209A publication Critical patent/CN102143209A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides a graph showing method, which comprises the following steps: step 102: a browser side sends a request to a server side, and the server side acquires the structural information of the graph for the server side; step 104: the server side plots the graph in the form of the graphic form in the request of the browser side according to the structural information of the graph, and sends the graph to the browser side to show. The invention also provides a graph showing device. With the invention, the organizational chart can be flexibly shown as required by the users, and the consistency between the shown graph and the graph at the client side can be ensured.

Description

Pattern exhibition method, device and server
Technical field
The present invention relates to a kind of pattern exhibition method, device and a kind of server.
Background technology
Continuous development along with Internet technology, a lot of traditional C/S (client end/server end) application programs have all forwarded under the B/S (browser/server), but also cast out a lot of flexibilities of C/S structure, the function that under C/S, is easy to realize more for example, it is unable to do what one wishes just to seem under B/S.
Often to draw organization chart miscellaneous in the human resources field, not only require the pattern of node and lines to be provided with, also will carry out various mutual.For example, the organization chart that sets is printed output, derives picture, or even and existing instrument in conjunction with editor, export to Word etc.
Organization chart is realized the still simple relatively alternately of complexity under C/S at present, but under the B/S structure, what realize some complexity is not so easy alternately, organization chart under the B/S is mainly to be shown as the master at present, promptly at first set up the membership of tissue, and then it is shown in patterned mode.The existing method of organization chart that realizes probably has following several:
(1) use the Table element of HTML to draw organization chart by Javascript.
(2) by the Div of Javascript use HTML, elements such as Table are drawn organization chart.
(3) the Active ActiveX drafting organization chart of drawing in conjunction with the support polar plot by Javascript.
Along with user's requirement becomes increasingly complex, above several method can not satisfy actual development requirement.The not only requirement that has many consumers at present can be showed membership credentials with beautiful outward appearance, also wishes these relations are generated picture, or even the node of tissue is edited again reset pattern and export picture again.Top method only is the demonstration problem that has solved organization chart, but all can not solve demand above-mentioned, has just solved the pattern that node and lines are set, and all can't solve for the operation of more complicated.For example, method (1) and method (2) all do not solve and derive picture, and the user edits problem again; And method (3) needs client browser that the Active control is installed, and does not also solve the problem of editing again.
Therefore, need provide a kind of method, show neatly and organize relational structure, allow the user that the membership credentials structure is edited once more, and in several ways the membership credentials structure is derived.
Summary of the invention
The technical issues that need to address of the present invention are, a kind of method is provided, and show neatly and organize relational structure, allow the user that the membership credentials structure is edited once more, and in several ways the membership credentials structure are derived.
In view of this, the invention provides a kind of pattern exhibition method, comprising: when step 102, browser end were sent request to server end, described server end obtained the structural information of the figure of described browser end; Step 104, described server end are drawn described figure according to the structural information of described figure with the graphic form in the request of described browser end, and described figure is sent to described browser end represent.By this technical scheme, can organization chart be represented flexibly according to user's needs, and can guarantee the figure that represents and the consistency of client existing graphics.
In technique scheme, preferably, in described step 104, when described graphic form is the picture form, described server end embeds the html text template that presets with the structural information of described figure, and described html text template is generated as picture and with described graphic plotting in described picture, more described picture is sent to described browser end.
In technique scheme, preferably, in described step 104, when described graphic form is the Word form, described server end embeds the Word text template that presets with the structural information of described figure, and described Word text template generated Word document and with described graphic plotting in described Word document, more described Word document is sent to described browser end.
In technique scheme, preferably, before described step 102, the described figure of described browser end is edited.
In technique scheme, preferably, described server end is drawn described figure by VML, and described browser end is supported VML.
The present invention also provides a kind of pattern exhibition device, is positioned at server end, comprising: the information acquisition module, and when server end sent request, described structural information acquisition module obtained the structural information of the figure of browser end at browser end; The graphic plotting module according to the structural information of described figure, is drawn described figure with the graphic form in the request of described browser end, and described figure is sent to described browser end represents.By this technical scheme, can organization chart be represented flexibly according to user's needs, and can guarantee the figure that represents and the consistency of client existing graphics.
In technique scheme, preferably, when described graphic form is the picture form, described graphic plotting module embeds the html text template that presets with the structural information of described figure, and described html text template is generated as picture and with described graphic plotting in described picture, described server end sends to described browser end with described picture.
In technique scheme, preferably, when described graphic form is the Word form, described graphic plotting module embeds the Word text template that presets with the structural information of described figure, and described Word text template generated Word document and with described graphic plotting in described Word document, described server end sends to described browser end with described Word document again.
In technique scheme, preferably, described graphic plotting module is drawn described figure by VML, and described browser end is supported VML.
The present invention also provides a kind of server, comprises above-mentioned pattern exhibition device.
By above technical scheme, can realize a kind of pattern exhibition method, device and a kind of server, can be neatly at the browser end graphing, and can guarantee that the figure of drawing is consistent at browser end editor's former figure with the user.
Description of drawings
Fig. 1 is the flow chart of pattern exhibition method according to an embodiment of the invention;
Fig. 2 is the block diagram of pattern exhibition device according to an embodiment of the invention;
Fig. 3 is the principle schematic of pattern exhibition method according to an embodiment of the invention;
Fig. 4 is the schematic diagram of pattern exhibition method graphing according to an embodiment of the invention;
Fig. 5 is pattern exhibition method according to an embodiment of the invention represents figure in webpage a flow chart;
Fig. 6 is pattern exhibition method according to an embodiment of the invention represents figure in word a flow chart;
Fig. 7 is the pictorial diagram of an institutional framework;
Fig. 8 is the entity schematic diagram of an institutional framework;
Fig. 9 is the schematic diagram of pattern exhibition method processing graphics structural information according to an embodiment of the invention.
Embodiment
In order more to be expressly understood above-mentioned purpose of the present invention, feature and advantage, the present invention is further described in detail below in conjunction with the drawings and specific embodiments.
Set forth a lot of details in the following description so that fully understand the present invention, still, the present invention can also adopt other to be different from other modes described here and implement, and therefore, the present invention is not limited to the restriction of following public specific embodiment.
Fig. 1 is the flow chart of pattern exhibition method according to an embodiment of the invention.
As shown in Figure 1, the invention provides a kind of pattern exhibition method, comprising: when step 102, browser end were sent request to server end, described server end obtained the structural information of the figure of described browser end; Step 104, described server end are drawn described figure according to the structural information of described figure with the graphic form in the request of described browser end, and described figure is sent to described browser end represent.
In technique scheme, in described step 104, when described graphic form is the picture form, described server end embeds the html text template that presets with the structural information of described figure, and described html text template is generated as picture and with described graphic plotting in described picture, more described picture is sent to described browser end.
In technique scheme, in described step 104, when described graphic form is the Word form, described server end embeds the Word text template that presets with the structural information of described figure, and described Word text template generated Word document and with described graphic plotting in described Word document, more described Word document is sent to described browser end.
In technique scheme, before described step 102, the described figure of described browser end is edited.
In technique scheme, described server end is drawn described figure by VML, and described browser end is supported VML.
Fig. 2 is the block diagram of pattern exhibition device according to an embodiment of the invention.
As shown in Figure 2, the present invention also provides a kind of pattern exhibition device 200, is positioned at server end, comprising: information acquisition module 202, when server end sent request, described structural information acquisition module 202 obtained the structural information of the figure of browser end at browser end; Graphic plotting module 204 according to the structural information of described figure, is drawn described figure with the graphic form in the request of described browser end, and described figure is sent to described browser end represents.
In technique scheme, when described graphic form is the picture form, described graphic plotting module 204 embeds the html text template that presets with the structural information of described figure, and described html text template is generated as picture and with described graphic plotting in described picture, described server end sends to described browser end with described picture.
In technique scheme, when described graphic form is the Word form, described graphic plotting module 204 embeds the Word text template that presets with the structural information of described figure, and described Word text template generated Word document and with described graphic plotting in described Word document, described server end sends to described browser end with described Word document again.
In technique scheme, described graphic plotting module 204 is drawn described figure by VML, and described browser end is supported VML.
The present invention also provides a kind of server, comprises above-mentioned pattern exhibition device 200.
Fig. 3 is the principle schematic of pattern exhibition method according to an embodiment of the invention.
Adopt the instrument of VML in the present embodiment as graphing.VML is the abbreviation of The Vector Markup Language (but vector SGML).VML is used for the SGML with the graph data vector quantization.VML is equivalent to the paintbrush of browser the inside, can draw various figures in IE; And the figure that VML draws can be discerned by Word, so this invention adopts VML to carry out the drafting of organization chart.Because at present popular browser, IE (5.0 and above version) supports VML, so the technical scheme in the present embodiment is particularly useful for IE.
The present invention is with the drafting of polar plot, browser com component technology, Word combines the technology such as support of HTML, has formed a kind of organization chart implementation method of innovation, and this method mainly comprises drawing practice, draws the derivation picture, derives Word file etc.
As shown in Figure 3, use this method to realize that the step of organization chart is as follows:
Step 302 is drawn organization chart at client browser.
Step 304 if derive picture, then redraws the picture that client presents at server end.For the consistency that keeps client and server end to present, the organization chart structure text data that client need be presented send to server end, at server end these data are embedded in the html text template then, redraw, so also just guarantee the consistent of client html text and server end html text, thereby guaranteed the consistency of the figure that client and server end are drawn.
Step 306, if derive Word, the organization chart structure text data that client is presented send to server end, at server end these data are embedded in the Word text template then, generate Word document.
Fig. 4 is the schematic diagram of pattern exhibition method graphing according to an embodiment of the invention.
In the present embodiment, VML is the position of determining figure by coordinate system, and technical scheme of the present invention adopts the method for degree of depth traversal to draw organization structure tree.Depend on following three factors for the position of a node:
(1) father's left brother tree
(2) all sub-children
(3) left brother tree
(X Y) finally depends on the maximum X of above-mentioned three factors, the Y value for node coordinate.An example as shown in Figure 4, the coordinate of mechanism 7 depends on mechanism 2 to be the coordinate (the left brother tree of father node) of the tree of root; The coordinate of mechanism 2 depends on mechanism 4, mechanism 5, the coordinate of mechanism 6 (all sub-children); The coordinate of mechanism 5 depends on mechanism 4 to be the coordinate (left brother tree) of the tree of root.Pattern exhibition method in the present embodiment can be reflected in the HTML dom tree by the various elements that VML draws, and this also is to subsequent operation, the basis that keeps consistency.
Fig. 5 is pattern exhibition method according to an embodiment of the invention represents figure in webpage a flow chart.
Technical scheme in the present embodiment is to adopt at server end to generate picture, and the method that downloads to client then derives picture.In order to guarantee that the picture that server end generates and the organization chart of client IE browser display are consistent, and need carry out according to the following steps:
Step 502, the user asks to draw organization chart, and server end is received request;
Step 504, client transfers back to server end with the HTML DOM element text of organization chart, server end embeds the html text template (as long as the text after guaranteeing to embed and the text of client IE browser are consistent with it, so template is unfixed, it is shown again at server end as the content of IE browser COM example;
Step 506, then at server end, the IViewObject interface of the COM example by the IE browser is depicted as picture with content displayed in the browser;
Step 508, server end is beamed back client with picture;
Step 510, the user obtains required picture in client.
Fig. 6 is pattern exhibition method according to an embodiment of the invention represents figure in word a flow chart.
The technical scheme of present embodiment adopts at first at server end and generates the text that the VML content can be discerned by Word when word file everywhere, and the method that downloads to client then derives the Word file.Because the figure that VML draws can be discerned by Word, need NameSpace and behavior and some other unit usually to support, so at first need to make a discernible text template of Word.Concrete steps are as follows:
Step 602, user's request is drawn organization chart with the word form, and server end is received request;
Step 604, the HTML DOM element text that server end is passed client back then embeds the corresponding position of Word text template, as long as the text after guaranteeing to embed can so template is unfixed, can just have been generated by organization's map file that Word discerns like this by Word identification;
Step 606, last, server end is passed the text that generates back client in the mode of document flow;
Step 608, the user can preserve the Word file at the picture of the scarce organization chart of client.
The figure of pattern exhibition method of the present invention being drawn below in conjunction with Fig. 7, Fig. 8 and Fig. 9 describes.
As shown in Figure 7, organization chart (being the figure that pattern exhibition method of the present invention need read and draw) mainly comprises objects such as node set, lines.The pattern of node is set by the node styled objects, the user can make node that different outward appearances be arranged by the different node pattern is set, when designing so polytype node can be set, different role in just can the dividing tissue structure chart, the board of directors for example, general manager, the assistant, manager, branch company, division department or the like.
And the entity design of carrying out at organization chart can be as shown in Figure 8, and the organization chart object is shared node object and lines object, and an organization chart object has and have only a lines object, can have 0 to n node object.Node is to liking an abstract object, and board of directors's node, general manager's node, assistant's node, branch company's node etc. are the concrete nodes that derives from from node.The organization chart object can provide organization's data for client, is used for showing.
Server end is treated to the standard XML format string with it and passes to client according to after obtaining the institutional framework data as the organization chart object of Fig. 8, draws VML figure by the javascript client script in client IE.At first div element of definition is drawn then as the organization chart container in DOM.
Because the institutional framework data of XML form belong to tree, the DOM Document that can select XML for use in client realizes more easy and convenient as its data structure like this.
Draw the method for organization chart utilization degree of depth traversal, the node coordinate passes through the last brother of father, sub-child, and father's last brother's coordinate decision depends primarily on wherein maximum X coordinate and Y coordinate.The node of drawing by VML represents the newest Document DOM element in the IE browser.
In the time of needs output picture and derivation WORD, can pass the DOM element text in the organization chart container back server end and handle, thereby realize final operation.
When client-requested output picture or after deriving WORD, will in the IE browser, pass server end back by the DOM element of present graphical, because these DOM elements will be retained in the various states of client, only need its reproduction to be got final product at server end.The object model of processing DOM element text as shown in Figure 9.
Owing to will realize the effect of What You See Is What You Get,, carry out picture by its IObjectView interface then and generate when generating picture so still use browser Active control to redraw at server end.
Generate word file, because WORD needs a lot of extra information to the support of VML, Bi Yao NameSpace for example, the introducings of VML behavior etc. so generate word file by template, are more prone to.Can preserve the html format file by WORD for the generation of WORD template obtains.
No matter be to generate picture or generate WORD, preserve returning to client at last in the mode of Response stream.
By technical scheme of the present invention, can realize a kind of pattern exhibition method and apparatus, can represent picture intuitively for the user, support that the user edits picture once more in client, and can picture be derived, and can guarantee to derive the consistency of picture and subscription client picture with word or webpage format.
The above is the preferred embodiments of the present invention only, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. a pattern exhibition method is characterized in that, comprising:
When step 102, browser end were sent request to server end, described server end obtained the structural information of the figure of described browser end;
Step 104, described server end are drawn described figure according to the structural information of described figure with the graphic form in the request of described browser end, and described figure is sent to described browser end represent.
2. pattern exhibition method according to claim 1, it is characterized in that, in described step 104, when described graphic form is the picture form, described server end embeds the html text template that presets with the structural information of described figure, and described html text template is generated as picture and with described graphic plotting in described picture, more described picture is sent to described browser end.
3. pattern exhibition method according to claim 1, it is characterized in that, in described step 104, when described graphic form is the Word form, described server end embeds the Word text template that presets with the structural information of described figure, and described Word text template generated Word document and with described graphic plotting in described Word document, more described Word document is sent to described browser end.
4. pattern exhibition method according to claim 1 is characterized in that, before described step 102, the described figure of described browser end is edited.
5. according to each described pattern exhibition method in the claim 1 to 4, it is characterized in that described server end is drawn described figure by VML, described browser end is supported VML.
6. a pattern exhibition device is positioned at server end, it is characterized in that, comprising:
The information acquisition module, when server end sent request, described structural information acquisition module obtained the structural information of the figure of browser end at browser end;
The graphic plotting module according to the structural information of described figure, is drawn described figure with the graphic form in the request of described browser end, and described figure is sent to described browser end represents.
7. pattern exhibition device according to claim 6, it is characterized in that, when described graphic form is the picture form, described graphic plotting module embeds the html text template that presets with the structural information of described figure, and described html text template is generated as picture and with described graphic plotting in described picture, described server end sends to described browser end with described picture.
8. pattern exhibition device according to claim 6, it is characterized in that, when described graphic form is the Word form, described graphic plotting module embeds the Word text template that presets with the structural information of described figure, and described Word text template generated Word document and with described graphic plotting in described Word document, described server end sends to described browser end with described Word document again.
9. according to each described pattern exhibition device in the claim 6 to 8, it is characterized in that described graphic plotting module is drawn described figure by VML, described browser end is supported VML.
10. a server is characterized in that, comprising:
Each described pattern exhibition device in the claim 6 to 9.
CN2010106164420A 2010-12-30 2010-12-30 Graph showing method, graph showing device and server Pending CN102143209A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010106164420A CN102143209A (en) 2010-12-30 2010-12-30 Graph showing method, graph showing device and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010106164420A CN102143209A (en) 2010-12-30 2010-12-30 Graph showing method, graph showing device and server

Publications (1)

Publication Number Publication Date
CN102143209A true CN102143209A (en) 2011-08-03

Family

ID=44410429

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010106164420A Pending CN102143209A (en) 2010-12-30 2010-12-30 Graph showing method, graph showing device and server

Country Status (1)

Country Link
CN (1) CN102143209A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104714794A (en) * 2013-12-12 2015-06-17 南宁市磁汇科技有限公司 Method and device for WEB page object dynamic combination
CN107391465A (en) * 2017-07-26 2017-11-24 郑州云海信息技术有限公司 A kind of method and device that dendrogram bottom element is positioned in the form of element group

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101076030A (en) * 2006-09-27 2007-11-21 腾讯科技(深圳)有限公司 System and method for transmitting realtime figure
CN101840403A (en) * 2009-03-19 2010-09-22 英业达股份有限公司 System and method thereof for online real-time graph drawing

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101076030A (en) * 2006-09-27 2007-11-21 腾讯科技(深圳)有限公司 System and method for transmitting realtime figure
CN101840403A (en) * 2009-03-19 2010-09-22 英业达股份有限公司 System and method thereof for online real-time graph drawing

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
夏立民等: "基于VML的矢量图形动态生成过程的研究", 《计算机技术与发展》 *
潘峰: "绘图脚本自动生成器的设计及应用", 《计算机技术与发展》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104714794A (en) * 2013-12-12 2015-06-17 南宁市磁汇科技有限公司 Method and device for WEB page object dynamic combination
CN107391465A (en) * 2017-07-26 2017-11-24 郑州云海信息技术有限公司 A kind of method and device that dendrogram bottom element is positioned in the form of element group

Similar Documents

Publication Publication Date Title
CN105786526B (en) A kind of efficient flow figure drawing system and method based on Web
CN103077239B (en) Based on the iFrame embedded Web 3D system that cloud is played up
CN104216691B (en) A kind of method and device for creating application
CN105867931B (en) The variation and device at information displaying interface
CN104932889B (en) Page visualized generation method and device
CN106484408A (en) A kind of node relationships figure display methods based on HTML5 and system
US20060212822A1 (en) Configuring a page for drag and drop arrangement of content artifacts in a page development tool
CN102027476A (en) File access via conduit application
CN103279559A (en) Rich text editing method and device based on Android system
CN110008366B (en) Construction drawing previewing method and system
CN102662921B (en) A kind of document processing method, device and editing machine
CN103257986A (en) Creating html/css representations of a geometric symbol
CN104572577B (en) Mathematical formulae processing method and processing device
CN103970750A (en) Method and device for generating HTML (Hypertext Markup Language) web pages
CN109254771A (en) A kind of monitoring page generation method and device
Zheng et al. Design and implementation of teaching system for mobile cross-platform
CN104951311A (en) Page making method and device
JPWO2007132568A1 (en) Data processing server and data processing method
KR20110016881A (en) Data viewer management
CN114780077A (en) Webpage visual editing device and method
CN102646102A (en) XML (Extensible Markup Language) file generating method and device as well as terminal equipment
CN102143209A (en) Graph showing method, graph showing device and server
CN103970763A (en) Three-dimensional image displaying system and method
CN107203503B (en) Method for monitoring form in real time applied to SVG interface
JPWO2006051974A1 (en) Document processing apparatus and document processing method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20110803