CN112800724A - Readable file export method of visual configuration template and related device - Google Patents

Readable file export method of visual configuration template and related device Download PDF

Info

Publication number
CN112800724A
CN112800724A CN202011598312.9A CN202011598312A CN112800724A CN 112800724 A CN112800724 A CN 112800724A CN 202011598312 A CN202011598312 A CN 202011598312A CN 112800724 A CN112800724 A CN 112800724A
Authority
CN
China
Prior art keywords
file
markup language
hypertext markup
template
readable
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
CN202011598312.9A
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.)
Hangzhou Tuya Information Technology Co Ltd
Original Assignee
Hangzhou Tuya Information Technology 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 Hangzhou Tuya Information Technology Co Ltd filed Critical Hangzhou Tuya Information Technology Co Ltd
Priority to CN202011598312.9A priority Critical patent/CN112800724A/en
Publication of CN112800724A publication Critical patent/CN112800724A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/14Tree-structured documents
    • G06F40/143Markup, e.g. Standard Generalized Markup Language [SGML] or Document Type Definition [DTD]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a readable file export method and a related device of a visual configuration template, wherein the readable file export method of the visual configuration template comprises the following steps: pre-marking a set position in the initial template; writing set variables in the preset positions after the pre-marking so as to generate a visual configuration template comprising the set variables; rendering the set variables to correspondingly generate a hypertext markup language file; exporting the hypertext markup language file into a readable file. Through the mode, the readable file export method of the visual configuration template can be used for displaying and editing the visual configuration template on the front-end page through the text editor, and can also be used for adding, editing and inquiring the template in real time through the page text editor, so that the corresponding operation mode is more convenient and humanized, when the visual configuration template needs to be changed, the method is more convenient and fast, the template export capability of universality can be provided, and the development efficiency is high.

Description

Readable file export method of visual configuration template and related device
Technical Field
The present application relates to the field of visual configuration templates, and in particular, to a method and a related device for exporting a readable file of a visual configuration template.
Background
Today, in the technical fields of Web (World Wide Web) development, contract visualization template configuration, contract generation and contract management, a front-end page of an intelligent terminal is usually involved, and a contract text is edited by a text editor to be exported to a readable file.
However, in the prior art, usually, a Format template engine is fixed in a code in a hard coding mode, and then a PDF (Portable Document Format) operation class library is used to derive a corresponding PDF file after data rendering.
However, the hard coding method also has the following disadvantages: 1. the method is derived through a template language hard coding mode, and if the template needs to be changed, the change can be carried out only by rewriting codes and re-issuing an application; 2. the template engine language freeMark (a template engine) cannot be displayed and edited on a front-end page through a text editor, is not friendly to common butt joint users, cannot newly add, edit and query templates in real time through the page text editor, is weak in operation convenience and humanization, and cannot be obtained by what you see; 3. if html (Hyper Text Markup Language) which can be displayed in a front-end page Text editor exists, no existing technology can be used for rendering and generating the html, and the html syntax check is very strict for generating a tool type itext PDF (a Java (computer programming Language) component for generating a PDF report) with a mature PDF on the market, but the html code stored by the Text editor cannot ensure a very strict html syntax format; 4. specific services can be seriously coupled, effective service decoupling can not be realized, and the universal template exporting capability can not be provided; 5. the development efficiency is low, and the time is long from the customization of the template to the online; 6. the unified management difficulty is high, the normative is poor, and the unified management difficulty is scattered in codes of all places.
Disclosure of Invention
The application provides a readable file export method of a visual configuration template and a related device, and the readable file export method of the visual configuration template can effectively solve the problems that the existing method is complex in template changing, cannot be displayed and edited on a front-end page through a text editor, cannot be used for newly adding, editing and inquiring the template in real time through the page text editor, is poor in operation convenience and humanization, cannot provide universal template export capacity, and is low in development efficiency.
In order to solve the technical problem, the application adopts a technical scheme that: a readable file export method of a visual configuration template is provided, wherein the readable file export method of the visual configuration template comprises the following steps: pre-marking a set position in the initial template; writing set variables in the preset positions after the pre-marking so as to generate a visual configuration template comprising the set variables; rendering the set variables to correspondingly generate a hypertext markup language file; exporting the hypertext markup language file into a readable file.
Wherein, before the step of pre-marking the set position in the initial template, the method further comprises the following steps: establishing a mapping relation between a set variable and a data field; the step of rendering the set variables to correspondingly generate the hypertext markup language file comprises the following steps: and rendering the data fields corresponding to the set variables to a visual configuration template based on the mapping relation so as to correspondingly generate a hypertext markup language file.
The method comprises the following steps of setting variables, wherein the setting variables comprise a set single-value variable, a set paragraph variable and a set list variable, and the step of rendering the setting variables comprises the following steps: rendering the set list class variable, and rendering the set single-value class variable and the set paragraph class variable.
Wherein, after the step of rendering the set variables to correspondingly generate the hypertext markup language file and before the step of exporting the hypertext markup language file to a readable file, the method further comprises the following steps: detecting whether a set variable exists or not and rendering is not carried out; and if the set variables are not rendered, rendering the set variables which are not rendered again.
Wherein, after the step of rendering the set variables to correspondingly generate the hypertext markup language file and before the step of exporting the hypertext markup language file to a readable file, the method further comprises the following steps: detecting whether a set variable exists or not and rendering is not carried out; and if the set variables are not rendered, rendering the set variables which are not rendered again.
Wherein, after the step of rendering the set variables to correspondingly generate the hypertext markup language file and before the step of exporting the hypertext markup language file to a readable file, the method further comprises the following steps: carrying out grammar check on the hypertext markup language file; if the hypertext markup language file has grammar problem, the grammar format of the hypertext markup language is complemented.
Wherein the step of completing the syntactic format of the hypertext markup language comprises: the tags in the hypertext markup language file that cause parsing recognition problems are replaced with the correct grammatical format tags.
Wherein the readable file is a pdf file, and the step of exporting the html file as a readable file comprises: converting the hypertext markup language file into a pdf file; acquiring position information of a preset keyword in a pdf file; adding a preset seal picture to a position corresponding to a preset keyword in a pdf file; and exporting the pdf file with a preset stamp picture.
The method comprises the following steps of reading a hypertext markup language file from a readable file, wherein the readable file is a word file, and the step of exporting the hypertext markup language file to the readable file comprises the following steps: removing unnecessary element information in the hypertext markup language file; the non-essential element information comprises script information and hyperlink target information; and converting the hypertext markup language file without the unnecessary element information into a word file and exporting the word file.
In order to solve the above technical problem, the present application adopts another technical solution: there is provided an intelligent terminal, wherein the intelligent terminal comprises a memory and a processor coupled to each other, the memory stores program data, and the processor is configured to execute the program data to implement the readable file export method of the visual configuration template as described in any one of the above.
In order to solve the above technical problem, the present application adopts another technical solution: there is provided a computer readable storage medium having stored thereon program data executable to implement a readable file export method of a visualization configuration template as described in any one of the above.
The beneficial effect of this application is: different from the prior art, the method for exporting the readable file of the visual configuration template in the application writes the set variable in the set position of the initial template through pre-marking the set position in the initial template, so as to generate the visual configuration template comprising the set variable, further renders the set variable, and exports the corresponding generated hypertext markup language file as the readable file, therefore, the hypertext markup language file can be displayed and edited on a front-end page, namely the visual configuration template, through a text editor on the front-end page, and the template can be newly added and inquired through the text editor on the front-end page, so that the corresponding operation method is more convenient and humanized, and when the visual configuration template needs to be changed, the code does not need to be written again, the application does not need to be released again, therefore, the method is more convenient, and can provide the template exporting capability of universality, the development efficiency is high.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts. Wherein:
FIG. 1 is a schematic flow chart diagram illustrating a first embodiment of a readable file export method for visualizing a configuration template according to the present application;
FIG. 2 is a schematic structural diagram of a visual configuration template in a specific application scenario of the readable file export method of the visual configuration template in FIG. 1;
FIG. 3 is a flowchart illustrating a second embodiment of a readable file export method for visualizing a configuration template according to the present application;
FIG. 4 is a flowchart illustrating a third embodiment of a readable file export method for visualizing a configuration template according to the present application;
FIG. 5 is a schematic flowchart of a fourth embodiment of a readable file export method for visualizing a configuration template according to the present application;
FIG. 6 is a flowchart illustrating a readable file export method for visualizing a configuration template according to an embodiment of the present invention;
FIG. 7 is a schematic structural diagram of an embodiment of an intelligent terminal according to the present application;
FIG. 8 is a schematic structural diagram of an embodiment of a computer-readable storage medium according to the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art without any creative effort based on the embodiments in the present application belong to the protection scope of the present application.
Referring to fig. 1-2, fig. 1 is a schematic flowchart illustrating a first embodiment of a readable file export method for visualizing a configuration template according to the present application; fig. 2 is a schematic structural diagram of a visualization configuration template in a specific application scenario of the readable file export method of the visualization configuration template in fig. 1. The implementation mode comprises the following steps:
s11: and pre-marking the set position in the initial template.
In the current contract management, contract visualization template configuration and contract generation are generally performed on an intelligent terminal, that is, contract text is edited in a front-end page text editor of the intelligent terminal and then exported to a readable file to replace paper-based contract writing and modification. However, there are usually contract templates that are used commonly for the same industry, or the same company, and the same type of contract, that is, the contract templates have the same text part and format style, and only personalized expression is performed on specific business contents or other detailed parts.
The method for exporting the readable file of the visual configuration template in the embodiment is realized by a rendering engine and a html grammar format completion mode, and specifically, a template document is firstly added to a front-end page of the intelligent terminal, or a universal template in a current application scene is called according to actual needs to serve as an initial template of the time, and pre-marking is performed on a set position in the initial template.
It can be understood that the setting position specifically refers to a position corresponding to the current initial template that needs to be subjected to text editing, and the pre-standard setting position is also converted into an editable mode, which can also be understood as introducing a text box and moving to the setting position so as to be capable of performing corresponding text editing in the text box or changing the original text at the setting position, and for a constant part that does not need to be changed, the original data content of the initial template can be continuously kept.
S12: and writing the set variables in the preset positions after the pre-marking to generate a visual configuration template comprising the set variables.
Further, writing a set variable at a preset position after the pre-marking, for example, writing a set variable at a preset position where the pre-marking has been performed in a front-end page text editor of the intelligent terminal, for example, first filling a name of the set variable at the preset position to generate a visual configuration template including the set variable, and then saving the visual configuration template in a back-end in a file form.
For convenience of explanation, specifically, as shown in fig. 2, by writing the pre-standard and the setting variable to the setting position of the initial template, the template document shown in fig. 2 can be obtained accordingly. The set variables may specifically include contract numbers, account information of the second party, purchased product information, and the like, and the set variables specifically include variable names, format information, variable types, and the like, and the set variables of different variable types correspond to different list formats, for example, a single-valued variable (such as a contract number in the figure) corresponds to a single variable value, and a list variable (such as purchased product information in the figure) corresponds to a plurality of variable values and corresponding list formats.
After the setting variable is written into the preset position of the pre-marking, the service information data can be rendered at the corresponding position of the setting variable, for example, the data content is filled at the position marked with $ { × } in fig. 2, wherein $ { × } may be specifically $ { system.
Wherein, to facilitate writing the setting variable at the preset position after the pre-marking, in an embodiment, before S12, the method may further include: a list of variables is established. As shown in fig. 2, the variable list specifically includes types and variable names, and the variable list may be understood as a common word stock of each type of variable, so that when the name of the set variable is written in a preset mark setting position, a currently required name can be more conveniently and directly copied from the variable list displayed synchronously with the template document to be pasted to the setting position, thereby completing the writing of the set variable.
S13: rendering the set variables to correspondingly generate a hypertext markup language file.
Specifically, after the visual configuration template including the set variable is generated on the front-end page, the set variable is further rendered, for example, the corresponding data content is filled in the position identified by $ { ×) in fig. 2, where the data content may be specifically set and filled by a service party, that is, a user according to specific needs, so as to correspondingly generate the hypertext markup language file.
S14: exporting the hypertext markup language file into a readable file.
Further, after obtaining the hypertext markup language document, exporting the hypertext markup language document as a readable document, for example, exporting the readable document to a corresponding PDF document or Word document, so as to obtain a filled-in contract document.
Further, it is understood that, in an embodiment, the set variables specifically include a set single-value class variable, a set paragraph class variable, and a set list class variable, and the above S13 specifically includes: rendering the set list class variable, and rendering the set single-value class variable and the set paragraph class variable.
It can be understood that different types of setting variables generally have different corresponding formats, and different format characteristics generally need to satisfy different rendering orders, for example, when a plurality of rows of setting list type variables need to be rendered in a visualization configuration template, the setting list type variables need to be rendered first, so as to render the setting single value type variables and the setting paragraph type variables.
Further, it is understood that, in a specific embodiment, after S13 and before S14, the method further includes: and detecting whether a set variable exists or not and rendering is not performed.
In order to ensure that no unrendered data missing exists in the finally obtained readable file, after the set variable is rendered to correspondingly generate the hypertext markup language file, the hypertext markup language file needs to be detected, for example, whether the set variable corresponding to the hypertext markup language file is still an initial value is detected, and no change is performed, so that when the set variable is not rendered, the unrendered set variable is rendered again, or when the set variable is determined to be actually unnecessary to be rendered, the determination is clicked to enter the next processing program.
Further, it is understood that, in a specific embodiment, after S13 and before S14, the method further includes: and carrying out grammar check on the hypertext markup language file.
In rendering the set variables to correspondingly generate the html file, there is usually a syntax problem inevitably, so after the html file is obtained, syntax check is performed to complete the syntax format of the html file when there is a syntax problem in the html file.
Specifically, the tags in the hypertext markup language document that may cause the parsing recognition problem are replaced with the tags in the correct syntax format, such as < br > is replaced with < br/> or the like.
Therefore, according to the method and the device, writing of corresponding quantities in the template and rendering of data content are carried out in a visual template configuration mode, and the defects caused by fixing a well-formatted template engine in a hard coding mode are effectively avoided.
Different from the prior art, the method for exporting the readable file of the visual configuration template in the application writes the set variable in the set position of the initial template through pre-marking the set position in the initial template, so as to generate the visual configuration template comprising the set variable, further renders the set variable, and exports the corresponding generated hypertext markup language file as the readable file, therefore, the hypertext markup language file can be displayed and edited on a front-end page, namely the visual configuration template, through a text editor on the front-end page, and the template can be newly added and inquired through the text editor on the front-end page, so that the corresponding operation method is more convenient and humanized, and when the visual configuration template needs to be changed, the code does not need to be written again, the application does not need to be released again, therefore, the method is more convenient, and can provide the template exporting capability of universality, the development efficiency is high.
Referring to fig. 3, fig. 3 is a flowchart illustrating a readable file export method for visualizing a configuration template according to a second embodiment of the present invention. The readable file export method of the visual configuration template in this embodiment is a flowchart of a detailed embodiment of the readable file export method of the visual configuration template in fig. 1, and includes the following steps:
s31: and establishing a mapping relation between the set variables and the data fields.
Specifically, before rendering the setting variables, a mapping relationship between the setting variables and the data fields needs to be established to express the setting variables as corresponding data fields, so as to complete filling of data contents corresponding to the setting variables.
It can be understood that the service side can determine the content expression of the corresponding visualization configuration template according to the actual need thereof by adding the mapping relationship between the variable and the data field by itself, for example, the service side generates a data file which is intended to be expressed by the corresponding service through the rendering engine by inputting the template code and the position information of the corresponding variable data. That is, the visual configuration template is configured based on the setting variables, and after the mapping relationship between the setting variables and the business fields is added, the business party can determine the expression of the template content.
S32: and pre-marking the set position in the initial template.
S33: and writing the set variables in the preset positions after the pre-marking to generate a visual configuration template comprising the set variables.
S32 and S33 are the same as S11 and S12 in fig. 1, and please refer to S11 and S12 and the related text description thereof, which are not repeated herein.
S34: and rendering the data fields corresponding to the set variables to a visual configuration template based on the mapping relation so as to correspondingly generate a hypertext markup language file.
Specifically, after the mapping relationship between the setting variables and the data fields is established and the setting variables are written to generate the corresponding visualization configuration template, the data fields corresponding to the setting variables are rendered to the visualization configuration template based on the mapping relationship to generate the hypertext markup language file correspondingly. When the visual configuration template is modified and the content is increased, the visual configuration template is in effect immediately, namely when a corresponding hypertext markup language file is generated each time, the corresponding file library is used for acquiring the latest data content and the corresponding mapping relation thereof.
S35: exporting the hypertext markup language file into a readable file.
S33 is the same as S12 in fig. 1, and please refer to S12 and the related text description, which are not repeated herein.
Referring to fig. 4, fig. 4 is a flowchart illustrating a third embodiment of a method for exporting a readable file from a visual configuration template according to the present application. The readable file export method of the visual configuration template in this embodiment is a flowchart of a detailed embodiment of the readable file export method of the visual configuration template in fig. 1, and includes the following steps:
s41: and pre-marking the set position in the initial template.
S42: and writing the set variables in the preset positions after the pre-marking to generate a visual configuration template comprising the set variables.
S43: rendering the set variables to correspondingly generate a hypertext markup language file.
S41, S42, and S43 are the same as S11, S12, and S13 in fig. 1, and please refer to S11, S12, and S13 and their related text descriptions, which are not described herein again.
S44: the hypertext markup language document is converted into a pdf document.
Specifically, after the html document is generated, the html document is further converted into a pdf document, for example, by operating through an iTextPdf toolkit, so as to export a corresponding html document into a corresponding pdf document.
S45: and acquiring the position information of the preset keywords in the pdf file.
Further, position information of a preset keyword in the pdf file is obtained, for example, the preset keyword to be stamped is searched and detected by line-by-line matching, and a corresponding position of the preset keyword is calculated, so that the position information of the preset keyword is obtained.
S46: and adding a preset seal picture to a position corresponding to a preset keyword in the pdf file.
After the position information of the preset keyword is obtained, a preset stamp picture, for example, a official seal of a company, is called out so as to be added to the position corresponding to the preset keyword in the pdf file.
S47: and exporting the pdf file with a preset stamp picture.
And further, exporting the pdf file with the preset stamp picture to obtain a contract file which is filled completely and is stamped with the preset stamp picture.
Referring to fig. 5, fig. 5 is a flowchart illustrating a fourth embodiment of a method for exporting a readable file from a visual configuration template according to the present application. The readable file export method of the visual configuration template in this embodiment is a flowchart of a detailed embodiment of the readable file export method of the visual configuration template in fig. 1, and includes the following steps:
s51: and pre-marking the set position in the initial template.
S52: and writing the set variables in the preset positions after the pre-marking to generate a visual configuration template comprising the set variables.
S53: rendering the set variables to correspondingly generate a hypertext markup language file.
S51, S52, and S53 are the same as S11, S12, and S13 in fig. 1, and please refer to S11, S12, and S13 and their related text descriptions, which are not described herein again.
S54: unnecessary element information in the hypertext markup language file is removed.
Specifically, after the hypertext markup language file is generated, unnecessary element information in the hypertext markup language file, for example, script information and hyperlink target information in the hypertext markup language file, etc., is further removed, that is, the unnecessary element information specifically includes one of the script information, the hyperlink target information, and any reasonable element information that does not need to be displayed in the derived readable file, which is not limited in this application.
S55: and converting the hypertext markup language file without the unnecessary element information into a word file and exporting the word file.
Further, after removing unnecessary element information in the hypertext markup language file, converting the unnecessary element information into a word file, and exporting the word file to obtain a filled-in contract file.
Referring to fig. 6, fig. 6 is a flowchart illustrating a readable file exporting method for a visual configuration template according to an embodiment of the present application. The implementation mode comprises the following steps:
s61: adding new template, and specifying template application type and customer.
In the contract management of the front-end page of the intelligent terminal, different templates are usually required for common contracts of different types and different clients.
Specifically, in this embodiment, a template is added or called in a template data center of a corresponding intelligent terminal, so as to further specify an application type of the template and a corresponding suitable client, or a suitable type of general template, such as a legal finance template or a purchase contract template, currently stored in the template data center and suitable for the current client is directly found according to the current actual needs of the user.
S62: writing template content and filling corresponding variables.
Furthermore, the corresponding set position in the template is pre-marked to correspondingly write the template content, and corresponding variables such as variable names and formats are filled in.
S63: and (4) auditing the legal affair financial template, wherein the template takes effect immediately after the auditing is passed.
And further, detecting whether confirmation information input by the user after the legal finance template is approved is received in real time, so that when the confirmation information is received, the current template is judged to pass, and the template takes effect immediately.
S64: and acquiring a personalized or universal template according to the type of the current template and the corresponding client.
Specifically, after the template takes effect immediately, the template is further classified according to the type of the current contract template and the corresponding client to obtain a corresponding personalized or universal template, so that the next direct call is facilitated.
S65: and rendering data to the template file in real time according to the relation between the variable and the service field, and providing download management.
Furthermore, according to the preset relation between the variable and the service field, data are rendered into the effective template in real time, and download management is provided.
S66: and covering a company official seal according to the position information of the preset keywords.
Still further, the template after the data rendering is sealed, for example, by searching for the position information of the preset keyword, the company official seal is sealed to the position corresponding to the keyword, and then the verification is performed, so that after the confirmation information that the verification is passed is received, the corresponding readable file available for downloading is generated, or the readable file is directly exported.
Based on the general inventive concept, the present application further provides an intelligent terminal, please refer to fig. 7, and fig. 7 is a schematic structural diagram of an embodiment of the intelligent terminal of the present application. The intelligent terminal 71 includes a memory 711 and a processor 712 coupled to each other, the memory 711 stores program data, and the processor 712 is configured to execute the program data to implement the readable file export method for visualizing the configuration template as described in any of the above.
Based on the general inventive concept, the present application further provides a computer-readable storage medium, please refer to fig. 8, and fig. 8 is a schematic structural diagram of an embodiment of the computer-readable storage medium of the present application. Wherein the computer readable storage medium 81 stores program data 811, the program data 811 being executable to implement a readable file export method of visualizing a configuration template as described in any of the above.
In one embodiment, the computer-readable storage medium 81 may be a memory chip in a terminal, a hard disk, or other readable and writable storage tool such as a mobile hard disk, a flash disk, an optical disk, or the like, or may be a server or the like.
In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a processor or a memory is merely a logical division, and an actual implementation may have another division, for example, a plurality of processors and memories may be combined to implement the functions or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or connection may be an indirect coupling or connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Different from the prior art, the method for exporting the readable file of the visual configuration template in the application writes the set variable in the set position of the initial template through pre-marking the set position in the initial template, so as to generate the visual configuration template comprising the set variable, further renders the set variable, and exports the corresponding generated hypertext markup language file as the readable file, therefore, the hypertext markup language file can be displayed and edited on a front-end page, namely the visual configuration template, through a text editor on the front-end page, and the template can be newly added and inquired through the text editor on the front-end page, so that the corresponding operation method is more convenient and humanized, and when the visual configuration template needs to be changed, the code does not need to be written again, the application does not need to be released again, therefore, the method is more convenient, and can provide the template exporting capability of universality, the development efficiency is high.
The above description is only for the purpose of illustrating embodiments of the present application and is not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application or are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.

Claims (10)

1. A readable file export method of a visual configuration template is characterized by comprising the following steps:
pre-marking a set position in the initial template;
writing set variables in the preset positions after the pre-marking to generate the visual configuration template comprising the set variables;
rendering the set variables to correspondingly generate a hypertext markup language file;
exporting the hypertext markup language file as the readable file.
2. The method for exporting a readable file of a visual configuration template according to claim 1, wherein said step of pre-marking the set position in the initial template further comprises:
establishing a mapping relation between the set variable and the data field;
the step of rendering the set variables to correspondingly generate a hypertext markup language file comprises the following steps:
rendering the data fields corresponding to the set variables to the visualization configuration template based on the mapping relation so as to correspondingly generate the hypertext markup language file.
3. The method of claim 1, wherein the setting variables comprise a setting single-value class variable, a setting paragraph class variable, and a setting list class variable, and the step of rendering the setting variables comprises:
rendering the set list class variable firstly, and rendering the set single-value class variable and the set paragraph class variable.
4. The method of claim 1, wherein the rendering the setting variables to correspond to the step of generating the hypertext markup language file and the step of exporting the hypertext markup language file to be the readable file further comprises:
detecting whether the set variable exists or not and rendering is not carried out;
and if the set variable is not rendered, rendering the set variable which is not rendered again.
5. The method of claim 1, wherein the rendering the setting variables to correspond to the step of generating the hypertext markup language file and the step of exporting the hypertext markup language file to be the readable file further comprises:
carrying out grammar check on the hypertext markup language file;
and if the hypertext markup language file has a grammar problem, complementing the grammar format of the hypertext markup language.
6. The method of claim 5, wherein the step of completing the grammar format of the hypertext markup language comprises:
replacing tags in the hypertext markup language file that can cause parsing recognition problems with correct syntax format tags.
7. The method of claim 1, wherein the readable file is a pdf file, and the step of exporting the html file to the readable file comprises:
converting the hypertext markup language document into the pdf document;
acquiring position information of a preset keyword in the pdf file;
adding a preset seal picture to a position corresponding to the preset keyword in the pdf file;
and exporting the pdf file with the preset stamp picture.
8. The method of claim 1, wherein the readable file is a word file, and the step of exporting the hypertext markup language file to the readable file comprises:
removing unnecessary element information in the hypertext markup language file; wherein the non-essential element information comprises script information and hyperlink target information;
and converting the hypertext markup language file without the unnecessary element information into the word file and exporting the word file.
9. An intelligent terminal, characterized in that the intelligent terminal comprises a memory and a processor coupled to each other;
the memory stores program data;
the processor is configured to execute the program data to implement the readable file export method of a visualization configuration template as claimed in any of claims 1-8.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores program data executable to implement the readable file export method of a visualization configuration template as claimed in any one of claims 1 to 8.
CN202011598312.9A 2020-12-29 2020-12-29 Readable file export method of visual configuration template and related device Pending CN112800724A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011598312.9A CN112800724A (en) 2020-12-29 2020-12-29 Readable file export method of visual configuration template and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011598312.9A CN112800724A (en) 2020-12-29 2020-12-29 Readable file export method of visual configuration template and related device

Publications (1)

Publication Number Publication Date
CN112800724A true CN112800724A (en) 2021-05-14

Family

ID=75805704

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011598312.9A Pending CN112800724A (en) 2020-12-29 2020-12-29 Readable file export method of visual configuration template and related device

Country Status (1)

Country Link
CN (1) CN112800724A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113343157A (en) * 2021-07-05 2021-09-03 湖南快乐阳光互动娱乐传媒有限公司 Content editing method and device based on domain-specific language
CN113900641A (en) * 2021-10-08 2022-01-07 苏州创腾软件有限公司 Template generation method and device, computer equipment and storage medium

Citations (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040187136A1 (en) * 2003-03-19 2004-09-23 International Business Machines Corporation Dynamic server page meta-engines with data sharing for dynamic content and non-JSP segments rendered through other engines
WO2005020026A2 (en) * 2003-08-22 2005-03-03 Ora International, Inc. Dynamic substitution semantics for web-based systems
US20060005174A1 (en) * 2004-07-01 2006-01-05 International Business Machines Corporation Defining hierarchical structures with markup languages and reflection
US20080046868A1 (en) * 2006-08-21 2008-02-21 Efstratios Tsantilis Method and system for template-based code generation
US7383498B1 (en) * 2002-12-27 2008-06-03 Sap Ag Editing styles for markup documents using parametrized styles sheets
US20130117656A1 (en) * 2011-11-08 2013-05-09 Microsoft Corporation Conversion of web template designs
US8615708B1 (en) * 2011-11-18 2013-12-24 Sencha, Inc. Techniques for live styling a web page
US20140033011A1 (en) * 2009-09-23 2014-01-30 Adobe Systems, Inc. Defining Hints for Dynamic Selection of Default Render/Submit/Runtime Configuration
CN104461484A (en) * 2013-09-16 2015-03-25 腾讯科技(深圳)有限公司 Front-end template implementation method and device
CN105095168A (en) * 2015-07-17 2015-11-25 北京奇虎科技有限公司 Automatic generation method and device for contract files
WO2016177250A1 (en) * 2015-05-05 2016-11-10 阿里巴巴集团控股有限公司 Client page rendering method and apparatus
WO2017124952A1 (en) * 2016-01-21 2017-07-27 阿里巴巴集团控股有限公司 Webpage script loading method and device
CN107463545A (en) * 2017-06-21 2017-12-12 杭州大搜车汽车服务有限公司 A kind of generation method, electronic equipment and the storage medium of online treaty documents
CN107766344A (en) * 2016-08-15 2018-03-06 阿里巴巴集团控股有限公司 The method, apparatus and browser that a kind of template renders
US9996965B1 (en) * 2016-12-08 2018-06-12 Newblue Inc. Template based text and graphics with dynamic duration
CN108280122A (en) * 2017-12-08 2018-07-13 上海葵普科技股份有限公司 The contract management system of configurable contract template
CN109710902A (en) * 2018-08-17 2019-05-03 深圳壹账通智能科技有限公司 Generation method, device, equipment and the computer readable storage medium of PDF document
US20190251145A1 (en) * 2018-02-14 2019-08-15 Pearson Education, Inc. System for markup language conversion
CN110263287A (en) * 2019-06-24 2019-09-20 北京字节跳动网络技术有限公司 Page rendering method and apparatus
CN110263317A (en) * 2019-06-27 2019-09-20 中国石油集团东方地球物理勘探有限责任公司 A kind of method and device generating document template
CN110347953A (en) * 2019-05-20 2019-10-18 中国平安财产保险股份有限公司 Page generation method, device, computer equipment and storage medium
CN110688600A (en) * 2019-09-09 2020-01-14 平安普惠企业管理有限公司 Online editing method, device and equipment based on HTML (Hypertext markup language) page and storage medium
CN110990731A (en) * 2019-10-12 2020-04-10 平安国际智慧城市科技股份有限公司 Rendering method, device and equipment of static webpage and computer storage medium
CN111241801A (en) * 2018-11-29 2020-06-05 北京京东尚科信息技术有限公司 File generation method, device, equipment and computer readable storage medium
CN111443909A (en) * 2020-03-23 2020-07-24 北京百度网讯科技有限公司 Method and device for generating page
CN111475163A (en) * 2020-06-22 2020-07-31 腾讯科技(深圳)有限公司 Method, device and equipment for generating code file of view template and storage medium
CN111782314A (en) * 2020-05-22 2020-10-16 北京达佳互联信息技术有限公司 Method and device for processing webpage form, electronic equipment and storage medium

Patent Citations (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7383498B1 (en) * 2002-12-27 2008-06-03 Sap Ag Editing styles for markup documents using parametrized styles sheets
US20040187136A1 (en) * 2003-03-19 2004-09-23 International Business Machines Corporation Dynamic server page meta-engines with data sharing for dynamic content and non-JSP segments rendered through other engines
WO2005020026A2 (en) * 2003-08-22 2005-03-03 Ora International, Inc. Dynamic substitution semantics for web-based systems
US20060005174A1 (en) * 2004-07-01 2006-01-05 International Business Machines Corporation Defining hierarchical structures with markup languages and reflection
US20080046868A1 (en) * 2006-08-21 2008-02-21 Efstratios Tsantilis Method and system for template-based code generation
US20140033011A1 (en) * 2009-09-23 2014-01-30 Adobe Systems, Inc. Defining Hints for Dynamic Selection of Default Render/Submit/Runtime Configuration
US20130117656A1 (en) * 2011-11-08 2013-05-09 Microsoft Corporation Conversion of web template designs
US8615708B1 (en) * 2011-11-18 2013-12-24 Sencha, Inc. Techniques for live styling a web page
CN104461484A (en) * 2013-09-16 2015-03-25 腾讯科技(深圳)有限公司 Front-end template implementation method and device
WO2016177250A1 (en) * 2015-05-05 2016-11-10 阿里巴巴集团控股有限公司 Client page rendering method and apparatus
CN105095168A (en) * 2015-07-17 2015-11-25 北京奇虎科技有限公司 Automatic generation method and device for contract files
WO2017124952A1 (en) * 2016-01-21 2017-07-27 阿里巴巴集团控股有限公司 Webpage script loading method and device
CN107766344A (en) * 2016-08-15 2018-03-06 阿里巴巴集团控股有限公司 The method, apparatus and browser that a kind of template renders
US9996965B1 (en) * 2016-12-08 2018-06-12 Newblue Inc. Template based text and graphics with dynamic duration
CN107463545A (en) * 2017-06-21 2017-12-12 杭州大搜车汽车服务有限公司 A kind of generation method, electronic equipment and the storage medium of online treaty documents
CN108280122A (en) * 2017-12-08 2018-07-13 上海葵普科技股份有限公司 The contract management system of configurable contract template
US20190251145A1 (en) * 2018-02-14 2019-08-15 Pearson Education, Inc. System for markup language conversion
CN109710902A (en) * 2018-08-17 2019-05-03 深圳壹账通智能科技有限公司 Generation method, device, equipment and the computer readable storage medium of PDF document
CN111241801A (en) * 2018-11-29 2020-06-05 北京京东尚科信息技术有限公司 File generation method, device, equipment and computer readable storage medium
CN110347953A (en) * 2019-05-20 2019-10-18 中国平安财产保险股份有限公司 Page generation method, device, computer equipment and storage medium
CN110263287A (en) * 2019-06-24 2019-09-20 北京字节跳动网络技术有限公司 Page rendering method and apparatus
CN110263317A (en) * 2019-06-27 2019-09-20 中国石油集团东方地球物理勘探有限责任公司 A kind of method and device generating document template
CN110688600A (en) * 2019-09-09 2020-01-14 平安普惠企业管理有限公司 Online editing method, device and equipment based on HTML (Hypertext markup language) page and storage medium
CN110990731A (en) * 2019-10-12 2020-04-10 平安国际智慧城市科技股份有限公司 Rendering method, device and equipment of static webpage and computer storage medium
CN111443909A (en) * 2020-03-23 2020-07-24 北京百度网讯科技有限公司 Method and device for generating page
CN111782314A (en) * 2020-05-22 2020-10-16 北京达佳互联信息技术有限公司 Method and device for processing webpage form, electronic equipment and storage medium
CN111475163A (en) * 2020-06-22 2020-07-31 腾讯科技(深圳)有限公司 Method, device and equipment for generating code file of view template and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
若晨工作室: "Vue+ElementUI实现表单动态渲染、可视化配置的方法", Retrieved from the Internet <URL:《https://blog.csdn.net/wojiaomaxiaoqi/article/details/81632721》> *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113343157A (en) * 2021-07-05 2021-09-03 湖南快乐阳光互动娱乐传媒有限公司 Content editing method and device based on domain-specific language
CN113900641A (en) * 2021-10-08 2022-01-07 苏州创腾软件有限公司 Template generation method and device, computer equipment and storage medium
CN113900641B (en) * 2021-10-08 2022-07-22 苏州创腾软件有限公司 Template generation method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110781423B (en) Webpage generation method and device and electronic equipment
CN107506343B (en) A kind of processing method and processing device of information editing
US8495008B2 (en) Application-aware recording and replay
CN101661512A (en) System and method for identifying traditional form information and establishing corresponding Web form
CN107943465B (en) Method and device for generating HTML (Hypertext markup language) form
EP1830275A1 (en) Information distribution system
CN112800724A (en) Readable file export method of visual configuration template and related device
CN111158687B (en) Interface generation method and device of JAVA plugin, computer equipment and storage medium
CN112764736B (en) Web end flow chart modeling method, device and system
CN109445775A (en) One key activity inline code method, apparatus and computer readable storage medium
CN111651966A (en) Data report file generation method and device and electronic equipment
CN116301813A (en) Low-code platform development method and system
CN115495421A (en) Data formatting method, device, electronic equipment and medium
CN113656000B (en) Webpage processing method and device
CN115759029A (en) Document template processing method and device, electronic equipment and storage medium
CN115618838A (en) Report generation method and equipment
CN109101429A (en) A kind of method and device of the browser page debugging of set-top box
CN115048083A (en) Visualization method and device for assembly, storage medium and electronic equipment
CN112181407B (en) Service realization processing method, device, system, electronic equipment and storage medium
CN111651696A (en) Product label customizing method and device, computer storage medium and electronic equipment
CN113918664B (en) Data processing method and device
CN113342416B (en) Method and equipment for displaying H5 graphic data in applet
CN111949266B (en) Webpage generation method and device and electronic equipment
CN111367976B (en) Method and device for exporting EXCEL file data based on JAVA reflection mechanism
CN117032666A (en) Page editing method and device based on editor, terminal equipment and storage medium

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