CN112817590A - Method for generating page cards in batch, storage medium and electronic equipment - Google Patents

Method for generating page cards in batch, storage medium and electronic equipment Download PDF

Info

Publication number
CN112817590A
CN112817590A CN202110087659.5A CN202110087659A CN112817590A CN 112817590 A CN112817590 A CN 112817590A CN 202110087659 A CN202110087659 A CN 202110087659A CN 112817590 A CN112817590 A CN 112817590A
Authority
CN
China
Prior art keywords
card
displayed
resource data
interface
cards
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
CN202110087659.5A
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.)
BOE Technology Group Co Ltd
Original Assignee
BOE Technology Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BOE Technology Group Co Ltd filed Critical BOE Technology Group Co Ltd
Priority to CN202110087659.5A priority Critical patent/CN112817590A/en
Publication of CN112817590A publication Critical patent/CN112817590A/en
Pending legal-status Critical Current

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/38Creation or generation of source code for implementing user interfaces
    • 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

Abstract

The disclosure provides a method for generating page cards in batches, a storage medium and electronic equipment, wherein the method comprises the following steps: acquiring resource data corresponding to a card to be displayed in a current page, wherein the resource data comprises at least one card object, and each card object corresponds to one card to be displayed in the current page; respectively generating hypertext markup language (HTML) elements of each card to be displayed based on the resource data; and displaying all the cards to be displayed in the card container based on the HTML elements of all the cards to be displayed. This is disclosed through obtaining the resource data that all cards correspond in the current page, can realize in same page layout, based on the different configuration condition of every card that treats to show, realizes generating the card of different styles in batches and demonstrates, and then has promoted the configuration efficiency of card, has promoted user's use and has experienced.

Description

Method for generating page cards in batch, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, a storage medium, and an electronic device for generating page cards in batch.
Background
At present, each enterprise often uses a resource management system to manage various data or materials in the daily working process, a background database is used for data storage, and a front-end display page is used for data display and operation. In practical implementation, a card form can be usually selected for displaying data or materials, and a simple display interface is formed based on the configuration of each card, so that a user can conveniently view the display interface; with the increase of business requirements of enterprises and the richness and changeability of card contents caused by the difference of user interface designs, the configuration efficiency of the card can be influenced by using the card configuration mode in the prior art, and the use experience of users is reduced.
Disclosure of Invention
An object of the embodiments of the present disclosure is to provide a method, an apparatus, a storage medium, and an electronic device for generating page cards in batch, so as to solve the problem of low card configuration efficiency in the prior art.
The embodiment of the disclosure adopts the following technical scheme: a method of generating page cards in batches, comprising: acquiring resource data corresponding to a card to be displayed in a current page, wherein the resource data comprises at least one card object, and each card object corresponds to one card to be displayed in the current page; respectively generating hypertext markup language (HTML) elements of each card to be displayed based on the resource data; displaying all the cards to be displayed in a card container based on the HTML elements of all the cards to be displayed.
Further, the acquiring resource data corresponding to the card to be displayed in the current page includes: and requesting the first interface of the background according to the first interface address and the first interface parameter, and acquiring the resource data fed back by the first interface.
Further, at least: card type, card name, card content; wherein the card type includes at least: text, picture, video, webpage, industrial control instruction and folder.
Further, the generating an HTML element of a card to be displayed based on the resource data includes: under the condition that the card type is a picture, generating a first picture node, setting the source attribute of the first picture node as a picture path, and placing the first picture node into a block node; under the condition that the card type is a video or a folder, generating a second picture node, setting the source attribute of the second picture node as a default picture path of the video or the folder, and placing the second picture node into a block node; and under the condition that the card type is a text, a webpage or an industrial control instruction, the card corresponding to the card is accommodated into the block node.
Further, the resource data further includes a card event of each card to be displayed, where the card event includes at least one of: click function, double click function, button click function, the button includes at least one of the following: copy, cut, edit, delete.
Further, the generating of the HTML element of the card to be displayed based on the resource data at least includes one of the following: binding the click function on the click event of the card; binding the double-click function on the double-click event of the card; configuring at least one button, and binding the button click function on the click event of the button.
Further, when the card type of the card is a folder, the double-click function of the card is configured to enter the folder, the method further comprising: and when the double-click event is triggered, determining a second interface address and second interface parameters based on the card name of the folder so as to request the second interface of the background, and acquiring the resource data fed back by the second interface.
Furthermore, the current page further comprises a return button, a redrawing function is bound on a click event of the return button, and the redrawing function is configured to call a corresponding interface to acquire resource data of an upper page of the current page based on an interface address and interface parameters corresponding to the upper page.
Embodiments of the present disclosure also provide a storage medium having a computer program stored thereon, where the computer program is executed by a processor to perform the steps of the above-mentioned card configuration efficiency method.
The embodiment of the present disclosure further provides an electronic device, which at least includes a memory and a processor, where the memory stores a computer program, and the processor implements the steps of the above card configuration efficiency method when executing the computer program on the memory.
The beneficial effects of this disclosed embodiment lie in: through acquiring the resource data corresponding to all the cards in the current page, the cards of different styles can be generated in batches to be displayed in the same page layout based on different configuration conditions of each card to be displayed, so that the configuration efficiency of the cards is improved, and the use experience of a user is improved.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present disclosure, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart of a method for batch generation of page cards in a first embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a page of a root directory of a content resource management system according to a first embodiment of the disclosure;
FIG. 3 is a card diagram of a picture resource according to a first embodiment of the disclosure;
FIG. 4 is a schematic card diagram of a video in a first embodiment of the present disclosure;
FIG. 5 is a card diagram of a text resource in a first embodiment of the disclosure;
FIG. 6 is a card diagram of a web resource according to a first embodiment of the disclosure;
FIG. 7 is a card diagram of industrial control instruction resources according to a first embodiment of the disclosure;
FIG. 8 is a page card intent of a folder resource in a first embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of an electronic device in a third embodiment of the present disclosure.
Detailed Description
Various aspects and features of the disclosure are described herein with reference to the drawings.
It will be understood that various modifications may be made to the embodiments of the present application. Accordingly, the foregoing description should not be construed as limiting, but merely as exemplifications of embodiments. Other modifications will occur to those skilled in the art within the scope and spirit of the disclosure.
The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the disclosure and, together with a general description of the disclosure given above, and the detailed description of the embodiments given below, serve to explain the principles of the disclosure.
These and other characteristics of the present disclosure will become apparent from the following description of preferred forms of embodiment, given as non-limiting examples, with reference to the attached drawings.
It should also be understood that, although the present disclosure has been described with reference to some specific examples, a person of skill in the art shall certainly be able to achieve many other equivalent forms of the disclosure, having the characteristics as set forth in the claims and hence all coming within the field of protection defined thereby.
The above and other aspects, features and advantages of the present disclosure will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.
Specific embodiments of the present disclosure are described hereinafter with reference to the accompanying drawings; however, it is to be understood that the disclosed embodiments are merely exemplary of the disclosure that may be embodied in various forms. Well-known and/or repeated functions and structures have not been described in detail so as not to obscure the present disclosure with unnecessary or unnecessary detail. Therefore, specific structural and functional details disclosed herein are not to be interpreted as limiting, but merely as a basis for the claims and as a representative basis for teaching one skilled in the art to variously employ the present disclosure in virtually any appropriately detailed structure.
The specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," which may each refer to one or more of the same or different embodiments in accordance with the disclosure.
A first embodiment of the present disclosure provides a method for generating page cards in batches, which is mainly applied to a system for implementing front-end data display through an HTML language, and can be implemented specifically by using plug-ins with corresponding functions, such as jQuery plug-ins, a flowchart of which is shown in fig. 1, and mainly includes steps S1 to S3:
and S1, acquiring the resource data corresponding to the card to be displayed in the current page.
In this embodiment, all resources are displayed in the form of cards, data related to all cards are stored in a background server or a database, the front end acquires the card data by requesting a background interface, and determines different interface addresses and interface parameters according to different current pages so as to request different interfaces of the background to acquire different resource data. In this embodiment, when resource data corresponding to a card to be displayed on a current page is requested, a first interface is requested to provide corresponding resource data according to a first interface address and a first interface parameter corresponding to the current page, which are configured in advance, wherein the first interface address is an address for calling the first interface provided by a background, calling the interface is to request data from the corresponding interface address, and the requested data describes data of resources in time; the method includes the steps that acquired resource data can be screened in the process of calling a first interface, and the front end can only acquire the resource data meeting certain screening conditions based on user requirements, for example, the first interface parameters include a type parameter used for representing the type of the resource data, when the type parameter is not transmitted, all types of resource data are acquired by default, and when the transmitted type is 1, only the resource data of a picture type are acquired; the specific type of resource obtained in the actual use process can be determined according to the management and screening condition of the user on the current page.
Specifically, the resource data corresponding to the card to be displayed includes at least one card object, each card object corresponds to one card to be displayed in the current page, the card object is mainly represented in a form of multiple key value pairs, and one attribute of the card, such as a card type, a card name, card content, and the like, is represented by each key value pair, where the card type at least includes types of text, picture, video, web page, industrial control instruction, folder, and the like, and is used to respectively represent the content displayed corresponding to the card, and the card content is content data specifically displayed by the card.
Further, the card is actually a visual display manner of data, and a user may manage the card itself or the content displayed by the card based on a requirement, so that the resource data of the card in this embodiment may further include a card event of the card to be displayed, for responding to an operation of the user on the card or the content of the card, where the card event includes at least one of the following: click function, double click function, button click function, etc.; generally, a single-click function is used for responding to a single-click event of a user on a card, a main realized function is to select a certain card, a double-click function is used for responding to a double-click event of the user on the card, a main realized function is to display all card contents of the card, when the card type is a folder, the double-click event realizes opening the folder and displaying other cards contained in the folder, when the card type comprises a button-click function, a button which can be clicked comprises at least one of a copy button, a cut button, an edit button and a delete button, and the click events corresponding to the buttons are respectively bound with the functions of the corresponding functions, so that the corresponding functions of copying, cutting, editing or deleting can be realized. Certainly, the card events that can be realized by the card include, but are not limited to, the above contents, and the user may also add, for example, a mouse floating display event, a drag event, and the like as further configuration contents of the card according to an actual demand situation.
In specific implementation, the configuration of the card may be performed according to the format shown in table 1, where the default values in the table are all values corresponding to the case where the card does not have a corresponding function.
TABLE 1
Figure BDA0002911489820000051
Figure BDA0002911489820000061
It should be noted that a plurality of cards can be displayed in one page at the same time, so the resource data acquired through the interface is data including all the cards that can be displayed on the current page, while for each card, the card object and the card event may be different, and what content is specifically displayed on each card or what operation can be implemented can be set by the user as required.
In addition, according to the user requirements, the cards in the embodiment can be divided into common resource cards and special resource cards, wherein the special resource cards are card resources which are different from the common resource cards and are independently set by the user, and the card objects corresponding to the cards belonging to the same kind of special resources have the same format and are different only in card content; in addition, in this embodiment, the special resource cards are limited to be only stored in the special resource folder, and the special resource folder cannot implement the button click event, that is, the special resource folder cannot perform the operations of copying, cutting, editing, or deleting, so that the resource data of the card further includes a parameter for distinguishing whether the current card is a special resource card or a common resource card, and when a certain card is of the special resource folder type, there is no corresponding button click event or the button click event is invalid. Specifically, the configuration item of the special resource is an array, and each object in the array is an exhibition configuration of the resource, for example:
{ label: 'name/name', name: 'name', type: 'text' };
{ label: 'first class', name: 'first', type: 'select', multiple: true, options [ { value:1, name: 'T1' } ] };
the method comprises the steps that label is a label name when a field is displayed, name is a key of a single resource object, type is an input type of the field represented by the name when the resource is created, two values of 'text' and 'select' are available and represent a text and a selection box, when the type is 'select', multiple and options key value pairs need to be added, multiple takes place to represent multiple selection, false takes place to represent single selection, options save an option object array, value in an option object represents an option value, and name represents an option display value.
And S2, respectively generating HTML (hypertext markup language) elements of each card to be displayed based on the resource data.
And S3, displaying all the cards to be displayed in the card container based on the HTML elements of all the cards to be displayed.
In the embodiment, the front-end page is displayed through the HTML, so that after the resource data of the card is acquired, the resource data of the card is converted into the HTML element, and then the page can be rendered to realize the card-based display. Specifically, in the process of converting the resource data of the card into the HTML element, different configurations may be performed based on different types of the card, for example, when the type of the card is a picture, a first picture node is generated, a source attribute src of the first picture node is set as a picture path (i.e., a path for storing the picture in the background), and then the first picture node is placed in a block node div; under the condition that the card type is a video or a folder, generating a second picture node, setting a source attribute src of the second picture node as a default picture path of the video or the folder, and placing the second picture node into a block node div, wherein the default picture may be one frame of a video file or a picture which is set in advance and used for representing the folder; under the condition that the card type is a text, a webpage or an industrial control instruction, the card content of the card type is usually in a text form, and at the moment, the card corresponding to the card is directly accommodated into the block node.
In some embodiments, for a special resource card set by a user, traversing the configuration item array of the special resource, and generating a row of < label name: displaying content in the form of content > to place in a paragraph node (p node); the single configuration item at least comprises a label, a name and a type, and may comprise multiple and options. The labelName in the generated HTML element result takes the label field of the current configuration item, and if the configuration item type is text, the content of the result takes the value of the field which has the same value as the name of the configuration item in the current resource object; if the configuration item type is select and the multiple is true, acquiring all option key values in the values of fields in the resource object, which are the same as the name value of the configuration item, finding Chinese names corresponding to the options in the options according to the key values and splicing the Chinese names into content; if type is select, the resultant content takes the option name in options corresponding to the value of the field in the resource object with the same name as the configuration item name value. ,
for example, the special resource card is "employee style", and the configuration items thereof include the following key value pairs: zhang three, then generate the first row of content: "name/name: zhang III ", where the labelName takes the value" name/name "of the configuration item label, since the value of the configuration item type is" text ", the value of the name is" name ", the content is the value" Zhang III "of the name field in the item.
Further, for the card event of the card, in the process of generating the HTML element of the card to be displayed based on the resource data, the following contents are also implemented: according to the specific content contained in the card event, corresponding functions are bound on the single-click event and the double-click event of the card, or at least one button is configured on the card based on the button click event, and the corresponding button click function is bound on the click event of the button, so that the configuration of the card button is completed, and the corresponding functions are realized when the button is clicked.
After the HTML element of the card to be displayed is generated, the specific content of the corresponding card to be displayed can be displayed on the page through page rendering based on the HTML element. Specifically, the card is displayed in a pre-called card container dom, in a general case, when page rendering is performed for the first time, a displayed page is a page corresponding to a root directory, before the card is displayed, an emptying operation should be performed on the card container to complete initialization, and when pages of other levels are subsequently entered, card display can be directly performed in the current card container.
The embodiment can realize that the cards of different styles are generated in batches to be displayed based on different configuration conditions of each card to be displayed in the same page layout by acquiring the resource data corresponding to all the cards in the current page, thereby improving the configuration efficiency of the cards and improving the use experience of users.
In some embodiments, when the type of the card is a folder, the double-click function of the card is configured to enter the folder, that is, when the user double-clicks the folder, the user may enter a page of the folder and browse the cards placed in the folder, in this case, the page currently displayed by the user is changed, which is equivalent to entering the next level of the current page, and the corresponding displayed card becomes a card included in the folder, so that, when the double-click event for the folder is triggered, the plug-in determines, based on the name or the ID of the folder, the second interface address and the second interface parameter of the second interface corresponding to the resource data of the folder, so as to request the background second interface to feed back the resource data corresponding to the folder, so as to implement the display of the content of the next level. It should be noted that the common folder card may further include a common folder card, so that the front-end page may display multi-level card resource displays, and each time when the next-level page is entered, the plug-in is called to obtain resource data of the card of the next-level page based on the corresponding interface.
Further, in combination with a double-click function of the folder card, in this embodiment, a return button may be further added to the current page at any level to return to the previous page, so as to implement switching between pages at multiple levels, specifically, a redrawing function is bound to a click event of the return button, and the redrawing function is configured to call a corresponding interface to obtain resource data of an upper page based on an interface address and an interface parameter corresponding to the upper page of the current page, so as to implement redrawing of the upper page; if the hierarchy to be entered is the root directory, the function interface address and the interface parameter are redrawn, the parameters recorded when the plug-in is called for the first time can be directly used, the resource data of the root directory is requested from a background again, then the card HTML element is generated, and page rendering is carried out. It should be appreciated that if the current page is the root directory, the back button is disabled.
In addition, for the special resource folder, because the folder is not allowed to be newly created, when the content displayed on the current page is the special resource card contained in the special resource folder, the hierarchy returned by clicking the return button is certainly the root directory, so that the parameters recorded when the plug-in is called for the first time can be directly used, and the interface address and the interface parameters do not need to be retransmitted.
The method for generating batch cards according to the present embodiment is described below with reference to fig. 2 to 8, taking a content resource management system used by a certain bank in Chongqing as an example.
Fig. 2 shows a page that needs to be implemented by the content resource management system, which mainly includes: the system comprises a resource management page, a picture resource page, a video resource page, a Web resource page, a text resource page and an industrial control instruction page. Among the pages, the content resource management page can uniformly manage common resources and special resources in the system, wherein the common resources include picture resources, video resources, text resources, web resources and industrial control instruction resources, which are respectively shown in fig. 3 to 8; the special resources include: employee wind resources, product supermarket resources, star product resources, wealth advisor resources, wealth calculator resources. The folders are divided into a common folder and a special folder, and the common folder can store any common resource; the special files are five in number, and the names are respectively ' employee's talent ', ' product supermarket ', ' star product ', ' wealth advisor ' and ' wealth calculator ', which are respectively used for storing five special resources.
In actual use, a user logs in the content resource management system based on a registered user name and a registered password, clicks a resource management menu under content resource management on the left side, and selects a Chongqing city branch. At this time, the front end requests all folders and resources of the highest level (the first layer) of the Chongqing city branch from the background, and the displayed content is the content under the root directory of the Chongqing city branch and comprises the following contents: common folder resources, special folder resources, and common resources. It should be noted that if the login user is a user in the Chongqing branch, the user has the authority to copy, cut, edit and modify the common files, common resources and special resources in each level of the Chongqing branch, after the common resources are copied or cut, the user can only paste in the common folder, and after the special resources are copied or cut, the user can only paste in the corresponding special folder, for example, the 'employee style' resource can only paste under the employee style folder; if the login user is not the user in the Chongqing branch, the user only has the copy right for the common files, common resources and special resources in each level of the Chongqing branch and can only be pasted under the corresponding folder.
In the page shown in fig. 2, the user can search the resources satisfying the above-mentioned screening conditions by filling in the resource name, selecting the resource tag, or selecting the status (review status), clicking the query, which is equivalent to calling the plug-in to complete a redrawing, and screening the type of the acquired resource data based on the screening conditions (interface parameters) in the redrawing process.
When a user double-clicks a certain folder in the picture 2, the plug-in can record the name or the ID of the folder, if the folder is not a special folder, the card redrawing method is called based on the interface parameters and the interface address corresponding to the folder; if the folder is a special folder, setting a new interface address, setting a dragging attribute (dragable) of the card as true, setting the card type as a resource type English name corresponding to the folder name, and redrawing by using a redrawing function.
A second embodiment of the present disclosure provides a storage medium, which can be installed in any electronic device with a processing function, and is specifically a computer-readable medium, storing a computer program, and when the computer program is executed by a processor, implementing the method provided in any embodiment of the present disclosure, including the following steps S21 to S23:
s21, acquiring resource data corresponding to the cards to be displayed in the current page, wherein the resource data comprise at least one card object, and each card object corresponds to one card to be displayed in the current page;
s22, respectively generating hypertext markup language (HTML) elements of each card to be displayed based on the resource data;
and S23, displaying all the cards to be displayed in the card container based on the HTML elements of all the cards to be displayed.
When the computer program is executed by the processor to acquire the resource data corresponding to the card to be displayed in the current page, the processor specifically executes the following steps: and requesting the first interface of the background according to the first interface address and the first interface parameter, and acquiring resource data fed back by the first interface.
Specifically, the card object at least includes: card type, card name, card content; wherein the card type includes at least: text, picture, video, webpage, industrial control instruction and folder.
When the processor executes the HTML elements of the cards to be displayed based on the resource data, the processor executes the following steps: under the condition that the card type is a picture, generating a first picture node, setting the source attribute of the first picture node as a picture path, and placing the first picture node into a block node; under the condition that the card type is a video or a folder, generating a second picture node, setting the source attribute of the second picture node as a default picture path of the video or the folder, and placing the second picture node into a block node; and under the condition that the card type is a text, a webpage or an industrial control instruction, placing the card content corresponding to the card into the block node.
Specifically, the resource data further includes a card event of each card to be displayed, where the card event includes at least one of the following: click function, double click function, button click function, the button includes one of following at least: copy, cut, edit, delete.
When the processor executes the HTML elements of the cards to be displayed based on the resource data, the processor executes one of the following steps: binding a click function on a click event of the card; binding a double-click function on a double-click event of the card; configuring at least one button, and binding a button click function on a click event of the button.
When the card type of the card is a folder, the double-click function of the card is configured to enter the folder, the computer program is further executed by the processor for: and when the double-click event is triggered, determining a second interface address and second interface parameters based on the card name of the folder so as to request a second interface of the background and acquire resource data fed back by the second interface.
The computer program is further executable by the processor to perform the steps of: the current page further comprises a return button, a redrawing function is bound on a click event of the return button, and the redrawing function is configured to call a corresponding interface to acquire resource data of an upper page based on an interface address and interface parameters corresponding to the upper page of the current page.
The embodiment can realize that the cards of different styles are generated in batches to be displayed based on different configuration conditions of each card to be displayed in the same page layout by acquiring the resource data corresponding to all the cards in the current page, thereby improving the configuration efficiency of the cards and improving the use experience of users.
A third embodiment of the present disclosure provides an electronic device, which is any device having a processing function, and a schematic structural diagram of the electronic device is shown in fig. 9, where the electronic device at least includes a memory 100 and a processor 200, the memory 100 stores a computer program, and the processor 200 implements the method provided in any embodiment of the present disclosure when executing the computer program on the memory 100. Illustratively, the electronic device computer program steps are as follows S31 to 33:
s31, acquiring resource data corresponding to the cards to be displayed in the current page, wherein the resource data comprise at least one card object, and each card object corresponds to one card to be displayed in the current page;
s32, respectively generating hypertext markup language (HTML) elements of each card to be displayed based on the resource data;
and S33, displaying all the cards to be displayed in the card container based on the HTML elements of all the cards to be displayed.
When the processor executes the resource data stored in the memory and corresponding to the card to be displayed in the current page, the following computer program is specifically executed: and requesting the first interface of the background according to the first interface address and the first interface parameter, and acquiring resource data fed back by the first interface.
Specifically, the card object at least includes: card type, card name, card content; wherein the card type includes at least: text, picture, video, webpage, industrial control instruction and folder.
When the processor executes the HTML element of the card to be displayed, which is stored in the memory and generated based on the resource data, the following computer program is specifically executed: under the condition that the card type is a picture, generating a first picture node, setting the source attribute of the first picture node as a picture path, and placing the first picture node into a block node; under the condition that the card type is a video or a folder, generating a second picture node, setting the source attribute of the second picture node as a default picture path of the video or the folder, and placing the second picture node into a block node; and under the condition that the card type is a text, a webpage or an industrial control instruction, placing the card content corresponding to the card into the block node.
Specifically, the resource data further includes a card event of each card to be displayed, where the card event includes at least one of the following: click function, double click function, button click function, the button includes one of following at least: copy, cut, edit, delete.
When the processor executes the HTML elements of the cards to be displayed, which are stored in the memory and generated based on the resource data, one of the following computer programs is specifically executed: binding a click function on a click event of the card; binding a double-click function on a double-click event of the card; configuring at least one button, and binding a button click function on a click event of the button.
When the card type of the card is a folder, the double-click function of the card is configured to enter the folder, and the processor further executes the following computer program: and when the double-click event is triggered, determining a second interface address and second interface parameters based on the card name of the folder so as to request a second interface of the background and acquire resource data fed back by the second interface.
The processor also executes the following computer program: the current page further comprises a return button, a redrawing function is bound on a click event of the return button, and the redrawing function is configured to call a corresponding interface to acquire resource data of an upper page based on an interface address and interface parameters corresponding to the upper page of the current page.
The embodiment can realize that the cards of different styles are generated in batches to be displayed based on different configuration conditions of each card to be displayed in the same page layout by acquiring the resource data corresponding to all the cards in the current page, thereby improving the configuration efficiency of the cards and improving the use experience of users.
While the present disclosure has been described in detail with reference to the embodiments, the present disclosure is not limited to the specific embodiments, and those skilled in the art can make various modifications and alterations based on the concept of the present disclosure, and the modifications and alterations should fall within the scope of the present disclosure as claimed.

Claims (10)

1. A method for generating page cards in batches is characterized by comprising the following steps:
acquiring resource data corresponding to a card to be displayed in a current page, wherein the resource data comprises at least one card object, and each card object corresponds to one card to be displayed in the current page;
respectively generating hypertext markup language (HTML) elements of each card to be displayed based on the resource data;
displaying all the cards to be displayed in a card container based on the HTML elements of all the cards to be displayed.
2. The method according to claim 1, wherein the obtaining resource data corresponding to the card to be displayed in the current page includes:
and requesting the first interface of the background according to the first interface address and the first interface parameter, and acquiring the resource data fed back by the first interface.
3. The method according to claim 2, wherein the card objects include at least: card type, card name, card content; wherein the card type includes at least: text, picture, video, webpage, industrial control instruction and folder.
4. The method of claim 3, wherein generating HTML elements for cards to be displayed based on the resource data comprises:
under the condition that the card type is a picture, generating a first picture node, setting the source attribute of the first picture node as a picture path, and placing the first picture node into a block node;
under the condition that the card type is a video or a folder, generating a second picture node, setting the source attribute of the second picture node as a default picture path of the video or the folder, and placing the second picture node into a block node;
and under the condition that the card type is a text, a webpage or an industrial control instruction, the card corresponding to the card is accommodated into the block node.
5. The method of claim 3, further comprising a card event for each card to be displayed in the resource data, wherein the card event comprises at least one of: click function, double click function, button click function, the button includes at least one of the following: copy, cut, edit, delete.
6. The method of claim 5, wherein generating HTML elements for a card to be displayed based on the resource data further comprises at least one of:
binding the click function on the click event of the card;
binding the double-click function on the double-click event of the card;
configuring at least one button, and binding the button click function on the click event of the button.
7. The method of claim 6, wherein when the card type of the card is a folder, the double-click function of the card is configured to enter the folder, the method further comprising:
and when the double-click event is triggered, determining a second interface address and second interface parameters based on the card name of the folder so as to request the second interface of the background, and acquiring the resource data fed back by the second interface.
8. The method according to claim 7, wherein the current page further comprises a return button, and a redrawing function is bound to a click event of the return button, and the redrawing function is configured to call a corresponding interface to obtain resource data of an upper page of the current page based on an interface address and an interface parameter corresponding to the upper page.
9. A storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the method of batch generation of page cards according to any one of claims 1 to 8.
10. An electronic device comprising at least a memory, a processor, the memory having a computer program stored thereon, wherein the processor, when executing the computer program on the memory, implements the steps of the method of batch generation of page cards of any of claims 1 to 8.
CN202110087659.5A 2021-01-22 2021-01-22 Method for generating page cards in batch, storage medium and electronic equipment Pending CN112817590A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110087659.5A CN112817590A (en) 2021-01-22 2021-01-22 Method for generating page cards in batch, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110087659.5A CN112817590A (en) 2021-01-22 2021-01-22 Method for generating page cards in batch, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN112817590A true CN112817590A (en) 2021-05-18

Family

ID=75858720

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110087659.5A Pending CN112817590A (en) 2021-01-22 2021-01-22 Method for generating page cards in batch, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112817590A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113792238A (en) * 2021-09-16 2021-12-14 山石网科通信技术股份有限公司 SVG image processing method and device, storage medium and processor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113792238A (en) * 2021-09-16 2021-12-14 山石网科通信技术股份有限公司 SVG image processing method and device, storage medium and processor

Similar Documents

Publication Publication Date Title
US5905498A (en) System and method for managing semantic network display
JP4972254B2 (en) Integrated method for creating refreshable web queries
TWI290698B (en) System and method for updating and displaying patent citation information
US7287229B2 (en) Template-driven process system
US20110145689A1 (en) Named object view over multiple files
US20090217153A1 (en) Document processing and management approach to editing a document in a mark up language environment using undoable commands
US20100079460A1 (en) method and system for generating and displaying an interactive dynamic selective view of multiply connected objects
US20080201645A1 (en) Method and Apparatus for Deploying Portlets in Portal Pages Based on Social Networking
US20090313539A1 (en) Information processor, information processing method, and recording medium
US11797258B2 (en) Conversational analytics with data visualization snapshots
EP1661030A2 (en) Generating end-user presentations from structured data
CN103034517A (en) Method and device for loading browser control tool
US8239754B1 (en) System and method for annotating data through a document metaphor
WO2006137565A1 (en) Document processing device, and document processing method
US11556502B2 (en) Intelligent routing based on the data extraction from the document
MXPA04006410A (en) File system shell.
US11182439B2 (en) Automatic data capture of desired data fields and generation of metadata based on captured data fields
CN103034518A (en) Method and browser for loading browser control tool
US7409642B2 (en) Method and system for applying user interface elements to data
US20040205584A1 (en) System and method for template creation and execution
US9652456B2 (en) Automated relationship management for darwin information typing architecture
US20030195896A1 (en) Method and apparatus for managing imported or exported data
US7325197B1 (en) Method and system for providing page control content
CN112817590A (en) Method for generating page cards in batch, storage medium and electronic equipment
WO2006051868A1 (en) Document processing device and document processing method

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