CN115421721A - Page dynamic configuration generation method and device, storage medium and electronic equipment - Google Patents
Page dynamic configuration generation method and device, storage medium and electronic equipment Download PDFInfo
- Publication number
- CN115421721A CN115421721A CN202211087332.9A CN202211087332A CN115421721A CN 115421721 A CN115421721 A CN 115421721A CN 202211087332 A CN202211087332 A CN 202211087332A CN 115421721 A CN115421721 A CN 115421721A
- Authority
- CN
- China
- Prior art keywords
- page
- generated
- model
- configuration
- current
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
- G06F40/177—Editing, e.g. inserting or deleting of tables; using ruled lines
- G06F40/18—Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/34—Graphical or visual programming
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/35—Creation or generation of source code model driven
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Computer Security & Cryptography (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
公开了页面动态配置生成方法、装置、存储介质及电子设备,属于计算机程序的实际应用技术领域。该方法包括:获取待生成页面的当前场景当前模型配置;根据待生成页面的当前场景当前模型配置,确认待生成页面的当前场景配置是否存在;若待生成页面的当前场景配置存在,获取待生成页面当前模型默认配置;根据待生成页面当前模型默认配置,确认待生成页面的当前模型默认场景配置是否存在;若待生成页面的当前模型默认场景配置存在,动态加载待生成页面的表单定义、表格定义、查询定义,生成待生成页面。该装置、介质及电子设备能够实现该方法。其通过在管理端简单的配置,勾选,拖拽方式、以达到实现快速动态的配置前端各个场景页面的展示效果的目的。
Disclosed are a page dynamic configuration generation method, device, storage medium and electronic equipment, belonging to the practical application technical field of computer programs. The method includes: acquiring the current model configuration of the current scene of the page to be generated; confirming whether the current scene configuration of the page to be generated exists according to the current model configuration of the current scene of the page to be generated; if the current scene configuration of the page to be generated exists, obtaining the The default configuration of the current model of the page; according to the default configuration of the current model of the page to be generated, confirm whether the default scene configuration of the current model of the page to be generated exists; if the default scene configuration of the current model of the page to be generated exists, dynamically load the form definition and form of the page to be generated Definition, query definition, and generate pages to be generated. The device, medium and electronics enable the method. It achieves the purpose of quickly and dynamically configuring the display effect of each scene page on the front end through simple configuration, check, and drag and drop methods on the management side.
Description
技术领域technical field
本发明涉及计算机程序的实际应用技术领域,特别是涉及一种页面动态配置生成方法、装置、存储介质及电子设备。The present invention relates to the technical field of practical application of computer programs, in particular to a page dynamic configuration generation method, device, storage medium and electronic equipment.
背景技术Background technique
现有技术中的研发设计需要开发人员编辑好前端页面代码与管理端逻辑代码,一旦遇到属性的增减,属性展示效果的调整,甚至相关属性的校验的调整都需要开发人员重新修改程序代码。重新发布程序包,重新部署到用户服务器才能实现。此过程不仅产生了很大的研发成本给用户带来了更多的支出,而且这个过程往往是一个漫长的过程,不能快速的响应用户的需求变化。The R&D design in the existing technology requires the developer to edit the front-end page code and the logic code of the management end. Once the increase or decrease of attributes, the adjustment of the attribute display effect, and even the adjustment of the verification of related attributes require the developer to re-modify the program code. This can only be achieved by republishing the package and redeploying it to the user's server. This process not only generates a lot of research and development costs, but also brings more expenditures to users, and this process is often a long process, which cannot quickly respond to changes in user needs.
发明内容Contents of the invention
有鉴于此,本发明提供了一种页面动态配置生成方法、装置、存储介质及电子设备,其通过在管理端简单的配置、勾选、拖拽方式、以达到实现快速动态的配置前端各个场景页面的展示效果的目的,从而更加适于实用。In view of this, the present invention provides a dynamic page configuration generation method, device, storage medium and electronic equipment, which achieve fast and dynamic configuration of each front-end scene through simple configuration, check, and drag and drop methods at the management end The purpose of the display effect of the page, so it is more suitable for practical use.
为了达到上述第一个目的,本发明提供的页面动态配置生成方法的技术方案如下:In order to achieve the above-mentioned first purpose, the technical scheme of the page dynamic configuration generation method provided by the present invention is as follows:
本发明提供的页面动态配置生成方法包括以下步骤:The page dynamic configuration generation method provided by the present invention comprises the following steps:
获取待生成页面的当前场景当前模型配置;Obtain the current model configuration of the current scene of the page to be generated;
根据所述待生成页面的当前场景当前模型配置,确认所述待生成页面的当前场景配置是否存在;According to the current model configuration of the current scene of the page to be generated, confirm whether the current scene configuration of the page to be generated exists;
若所述待生成页面的当前场景配置存在,获取所述待生成页面当前模型默认配置;If the current scene configuration of the page to be generated exists, obtain the default configuration of the current model of the page to be generated;
根据所述待生成页面当前模型默认配置,确认所述待生成页面的当前模型默认场景配置是否存在;According to the default configuration of the current model of the page to be generated, confirm whether the default scene configuration of the current model of the page to be generated exists;
若所述待生成页面的当前模型默认场景配置存在,动态加载所述待生成页面的表单定义、表格定义、查询定义,生成所述待生成页面。If the current model default scene configuration of the page to be generated exists, dynamically load the form definition, table definition, and query definition of the page to be generated to generate the page to be generated.
本发明提供的页面动态配置生成方法还可采用以下技术措施进一步实现。The page dynamic configuration generation method provided by the present invention can also be further realized by adopting the following technical measures.
作为优选,所述根据所述待生成页面的当前场景当前模型配置,确认所述待生成页面的当前场景配置是否存在的步骤过程中,若所述待生成页面的当前场景配置不存在,还包括以下步骤:Preferably, during the step of confirming whether the current scene configuration of the page to be generated exists according to the current model configuration of the current scene of the page to be generated, if the current scene configuration of the page to be generated does not exist, further comprising The following steps:
获取所述待生成页面的当前模型的父模型的当前场景配置;Obtain the current scene configuration of the parent model of the current model of the page to be generated;
根据所述待生成页面的当前模型的父模型的当前场景配置,确认所述待生成页面的当前场景配置是否存在:According to the current scene configuration of the parent model of the current model of the page to be generated, confirm whether the current scene configuration of the page to be generated exists:
若所述待生成页面的当前场景配置存在,获取所述待生成页面当前模型默认配置;If the current scene configuration of the page to be generated exists, obtain the default configuration of the current model of the page to be generated;
若所述待生成页面的当前场景配置不存在,确认所述待生成页面的当前模型的父模型的当前场景配置是否为所述待生成页面的当前模型的根模型,If the current scene configuration of the page to be generated does not exist, confirm whether the current scene configuration of the parent model of the current model of the page to be generated is the root model of the current model of the page to be generated,
若所述待生成页面的当前模型的父模型的当前场景配置是所述待生成页面的当前模型的根模型,获取所述待生成页面当前模型默认配置,If the current scene configuration of the parent model of the current model of the page to be generated is the root model of the current model of the page to be generated, obtain the default configuration of the current model of the page to be generated,
若所述待生成页面的当前模型的父模型的当前场景配置不是所述待生成页面的当前模型的根模型,返回获取所述待生成页面的当前模型的父模型的当前场景配置。If the current scene configuration of the parent model of the current model of the page to be generated is not the root model of the current model of the page to be generated, return to obtain the current scene configuration of the parent model of the current model of the page to be generated.
作为优选,所述根据所述待生成页面当前模型默认配置,确认所述待生成页面的当前模型默认场景配置是否存在的步骤过程中,若所述待生成页面的当前模型默认场景配置不存在,还包括以下步骤:Preferably, during the step of confirming whether the default scene configuration of the current model of the page to be generated exists according to the default configuration of the current model of the page to be generated, if the default scene configuration of the current model of the page to be generated does not exist, Also includes the following steps:
获取所述待生成页面的当前模型的父模型的默认场景配置;Obtain the default scene configuration of the parent model of the current model of the page to be generated;
根据所述待生成页面的当前模型的父模型的默认场景配置,确认所述待生成页面的默认场景配置是否存在:According to the default scene configuration of the parent model of the current model of the page to be generated, confirm whether the default scene configuration of the page to be generated exists:
若所述当前模型的父模型的默认场景配置存在,动态加载所述待生成页面的表单定义、表格定义、查询定义,生成所述待生成页面,If the default scene configuration of the parent model of the current model exists, dynamically load the form definition, form definition, and query definition of the page to be generated, and generate the page to be generated,
若所述当前模型的父模型的默认场景配置不存在,获取所述待生成页面的当前模型的父模型的默认场景配置,If the default scene configuration of the parent model of the current model does not exist, obtain the default scene configuration of the parent model of the current model of the page to be generated,
根据所述待生成页面的当前模型的父模型的默认场景配置,确认所述当前模型的父模型的默认场景配置是否存在,According to the default scene configuration of the parent model of the current model of the page to be generated, confirm whether the default scene configuration of the parent model of the current model exists,
若所述当前模型的父模型的默认场景配置存在,动态加载所述待生成页面的表单定义、表格定义、查询定义,生成所述待生成页面,If the default scene configuration of the parent model of the current model exists, dynamically load the form definition, form definition, and query definition of the page to be generated, and generate the page to be generated,
若所述当前模型的父模型的默认场景配置不存在,确认所述待生成页面的当前模型的父模型的默认场景配置是否为所述待生成页面的默认模型的根模型,If the default scene configuration of the parent model of the current model does not exist, confirm whether the default scene configuration of the parent model of the current model of the page to be generated is the root model of the default model of the page to be generated,
若所述待生成页面的当前模型的父模型的默认场景配置是所述待生成页面的默认模型的根模型,终止所述待生成页面的生成;If the default scene configuration of the parent model of the current model of the page to be generated is the root model of the default model of the page to be generated, terminate the generation of the page to be generated;
若所述待生成页面的当前模型的父模型的默认场景配置不是所述待生成页面的默认模型的根模型,返回获取所述待生成页面的当前模型的父模型的默认场景配置。If the default scene configuration of the parent model of the current model of the page to be generated is not the root model of the default model of the page to be generated, return to obtain the default scene configuration of the parent model of the current model of the page to be generated.
作为优选,所述获取所述待生成页面的当前模型的父模型的当前场景配置的步骤过程中,若所述待生成页面的当前模型存在个性化需求,还包括以下步骤:Preferably, during the step of obtaining the current scene configuration of the parent model of the current model of the page to be generated, if the current model of the page to be generated has individual requirements, the following steps are further included:
重载所述待生成页面的当前模型的父模型的配置;Overload the configuration of the parent model of the current model of the page to be generated;
根据所述待生成页面的当前模型的个性化需求,进行个性化修改,得到修改后的所述待生成页面的当前模型的父模型的配置,使得所述修改后的所述待生成页面的当前模型的父模型的配置与所述待生成页面的当前模型的个性化需求相适应。According to the personalized requirements of the current model of the page to be generated, perform personalized modification, and obtain the modified configuration of the parent model of the current model of the page to be generated, so that the modified current model of the page to be generated The configuration of the parent model of the model is adapted to the individual requirements of the current model of the page to be generated.
作为优选,所述获取待生成页面的当前场景当前模型配置的步骤过程中,所述待生成页面的当前场景当前模型配置包括身份标识、名称、数据类型、数据长度、数据字典、格式化器、是否可以参与到后续的表单配置、表格配置、查询配置,导入配置中的一种或者多种属性信息。Preferably, during the step of obtaining the current scene current model configuration of the page to be generated, the current scene current model configuration of the page to be generated includes identity, name, data type, data length, data dictionary, formatter, Whether it is possible to participate in the subsequent form configuration, table configuration, query configuration, and import one or more attribute information in the configuration.
作为优选,所述若所述待生成页面的当前模型默认场景配置存在,动态加载所述待生成页面的表单定义、表单定义、查询定义,生成所述待生成页面的步骤过程中,Preferably, if the current model default scene configuration of the page to be generated exists, dynamically load the form definition, form definition, and query definition of the page to be generated, and during the step of generating the page to be generated,
所述动态加载所述待生成页面的表单定义具体包括以下步骤:The dynamic loading of the form definition of the page to be generated specifically includes the following steps:
所述待生成页面的前端页面在涉及到新建、编辑、详情等表单的页面中通过在页面中预定义与表单定义中相同的场景身份标识,根据所述场景身份标识,找到具体的表单定义的模板页面,通过Vue软件的前端动态加载技术,将配置的表单定义动态加载到所述待生成页面中;The front-end page of the page to be generated finds the specific form definition by predefining the same scene identity in the page as in the form definition in pages related to forms such as new creation, editing, and details, according to the scene identity The template page dynamically loads the configured form definition into the page to be generated through the front-end dynamic loading technology of the Vue software;
所述动态加载所述待生成页面的表格定义具体包括以下步骤:The dynamic loading of the table definition of the page to be generated specifically includes the following steps:
所述待生成页面的前端页面在涉及到列表表格展示的页面中通过在页面中预定义与表格定义中相同的场景身份标识,根据所述场景标识找到具体的表格定义的模板页面,通过Vue软件的前端动态加载技术,将配置的表格定义动态加载到页面中;The front-end page of the page to be generated is in the page related to the display of the list table, by predefining the same scene identity in the page as in the table definition, and finding the template page of the specific table definition according to the scene mark, through the Vue software The front-end dynamic loading technology dynamically loads the configured table definition into the page;
所述动态加载所述待生成页面的查询定义具体包括以下步骤:The dynamic loading of the query definition of the page to be generated specifically includes the following steps:
所述待生成页面的前端页面在涉及到查询表单的页面中通过在页面中预定义与表单定义中相同的场景身份标识,根据所述场景身份标识找到具体的表单定义的模板页面,通过Vue软件的前端动态加载技术,将配置的查询表单定义动态加载到页面中。The front-end page of the page to be generated is in the page related to the query form by predefining the same scene identity in the page as in the form definition, and finding the template page of the specific form definition according to the scene identity, through the Vue software The front-end dynamic loading technology dynamically loads the configured query form definition into the page.
作为优选,所述若所述待生成页面的当前模型默认场景配置存在,动态加载所述待生成页面的表单定义、表单定义、查询定义,生成所述待生成页面的步骤过程中,Preferably, if the current model default scene configuration of the page to be generated exists, dynamically load the form definition, form definition, and query definition of the page to be generated, and during the step of generating the page to be generated,
所述动态加载所述待生成页面的表单定义具体还包括以下步骤:The dynamic loading of the form definition of the page to be generated specifically further includes the following steps:
在所述待生成页面的前端页面中需要加载某一类模型的定义作为展示根模型定义,加载过程中根据模型的继承关系,动态加载所有子模型的定义,实现页面的表单动态生成展示效果;In the front-end page of the page to be generated, it is necessary to load the definition of a certain type of model as the display root model definition, and dynamically load the definitions of all sub-models according to the inheritance relationship of the model during the loading process, so as to realize the dynamic generation and display effect of the form of the page;
所述动态加载所述待生成页面的表格定义具体还包括以下步骤:The dynamic loading of the table definition of the page to be generated specifically further includes the following steps:
所述待生成页面表格的显示列同时支持用户级别的个性化设置,在表格的设置功能中提供用户级属性列表的显示设置以及属性的排列顺序的设置,同时支持恢复系统默认配置功能;The display column of the page table to be generated supports the personalized setting of the user level at the same time, provides the display setting of the user-level attribute list and the setting of the arrangement order of the attribute in the setting function of the form, and supports the function of restoring the default configuration of the system at the same time;
所述动态加载所述待生成页面的查询定义具体还包括以下步骤:The dynamic loading of the query definition of the page to be generated specifically further includes the following steps:
在所述待生成页面前端页面中需要加载某一类模型的定义作为展示根模型定义,加载过程中根据模型的继承关系,动态加载所有子模型的定义,从而实现页面的表单动态生成展示效果。In the front-end page of the page to be generated, the definition of a certain type of model needs to be loaded as the display root model definition. During the loading process, the definitions of all sub-models are dynamically loaded according to the inheritance relationship of the model, so as to realize the dynamic generation and display effect of the form of the page.
为了达到上述第二个目的,本发明提供的页面动态配置生成装置的技术方案如下:In order to achieve the above-mentioned second purpose, the technical solution of the page dynamic configuration generation device provided by the present invention is as follows:
本发明提供的页面动态配置生成装置包括:The page dynamic configuration generation device provided by the present invention includes:
当前场景当前模型配置获取模块,用于获取待生成页面的当前场景当前模型配置;The current scene current model configuration acquisition module is used to obtain the current scene current model configuration of the page to be generated;
第一确认模块,用于根据所述待生成页面的当前场景当前模型配置,确认所述待生成页面的当前场景配置是否存在;The first confirmation module is configured to confirm whether the current scene configuration of the page to be generated exists according to the current model configuration of the current scene of the page to be generated;
当前模型默认配置获取模块,若所述待生成页面的当前场景配置存在,用于获取所述待生成页面当前模型默认配置;The current model default configuration obtaining module is used to obtain the current model default configuration of the to-be-generated page if the current scene configuration of the to-be-generated page exists;
第二确认模块,用于根据所述待生成页面当前模型默认配置,确认所述待生成页面的当前模型默认场景配置是否存在;The second confirmation module is used to confirm whether the current model default scene configuration of the page to be generated exists according to the default configuration of the current model of the page to be generated;
动态加载模块,若所述待生成页面的当前模型默认场景配置存在,用于动态加载所述待生成页面的表单定义、表格定义、查询定义,生成所述待生成页面。A dynamic loading module, if the current model default scene configuration of the page to be generated exists, is used to dynamically load the form definition, table definition, and query definition of the page to be generated, and generate the page to be generated.
为了达到上述第三个目的,本发明提供的计算机可读存储介质的技术方案如下:In order to achieve the above-mentioned third purpose, the technical solution of the computer-readable storage medium provided by the present invention is as follows:
本发明提供的计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有页面动态配置生成程序,所述页面动态配置生成程序在被处理器执行时,实现本发明提供的页面动态配置生成方法的步骤。The computer-readable storage medium provided by the present invention is characterized in that a page dynamic configuration generation program is stored on the computer-readable storage medium. When the page dynamic configuration generation program is executed by a processor, the page dynamic configuration generation program realizes the page provided by the present invention. The steps of the dynamic configuration generation method.
为了达到上述第四个目的,本发明提供的电子设备的技术方案如下:In order to achieve the above-mentioned fourth purpose, the technical solution of the electronic equipment provided by the present invention is as follows:
本发明提供的电子设备,其特征在于,包括存储器和处理器,所述存储器上存储有页面动态配置生成程序,所述页面动态配置生成程序在被所述处理器执行时,实现本发明提供的页面动态配置生成方法的步骤。The electronic device provided by the present invention is characterized in that it includes a memory and a processor, the memory stores a page dynamic configuration generation program, and when the page dynamic configuration generation program is executed by the processor, it implements the The steps of the page dynamic configuration generating method.
本发明提供的页面动态配置生成方法、装置、存储介质及电子设备将模型建模与表单设计器相结合,通过在管理端简单的配置,勾选,拖拽方式、以达到实现快速动态的配置前端各个场景页面的展示效果的目的。解决产品针对不同企业业务模型以及各个场景页面中的属性也不同的个性化配置问题。同时解决大部分客户需求中对模型属性增减,表单、表格、查询条件展示调整,必填、校验及提示等调整带来的需要重新修改代码,发布程序包的问题。通过页面中预定义场景身份标识以及模型的父子继承关系,达到增删改调整子模型以及模型属性后不需要开发人员介入的情况下动态调整页面的目的。同时通过不同角色用户预定义不同的场景身份标识可以实现同一个业务页面针对不同角色关注内容的不同动态显示的目的。所有配置定义信息支持导出,导入excel功能。导出系统的初始设置excel文件后,可以便于现场实施人员与客户沟通业务模型,同时实施人员与用户沟通后可以直接在excel中修改相关信息。修改后直接导入系统相应的调整即可生效,其大大提高了产品定制的实施效率。The page dynamic configuration generation method, device, storage medium and electronic equipment provided by the present invention combine model modeling with a form designer, and achieve fast and dynamic configuration through simple configuration, check, and dragging at the management end The purpose of displaying the effect of each scene page on the front end. Solve the personalized configuration problem that the product is different for different enterprise business models and attributes in each scene page. At the same time, it solves the problems that most of the customer needs need to re-modify the code and release the package due to the increase or decrease of model attributes, the adjustment of form, table, and query condition display, the adjustment of required fields, verification, and prompts. Through the pre-defined scene identity and the parent-child inheritance relationship of the model in the page, the purpose of dynamically adjusting the page after adding, deleting, modifying and adjusting the sub-model and model attributes is achieved without the intervention of the developer. At the same time, by predefining different scene identities for users with different roles, the purpose of different dynamic display of the same business page for different role-focused content can be realized. All configuration definition information supports export and import excel functions. After exporting the initial setting excel file of the system, it is convenient for on-site implementers to communicate with customers about the business model, and at the same time, implementers can directly modify relevant information in excel after communicating with users. After the modification, it can be directly imported into the system and the corresponding adjustment can take effect, which greatly improves the implementation efficiency of product customization.
附图说明Description of drawings
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiment. The drawings are only for the purpose of illustrating a preferred embodiment and are not to be considered as limiting the invention. Also throughout the drawings, the same reference numerals are used to designate the same components. In the attached picture:
图1为本发明实施例提供的页面动态配置生成方法的概括步骤流程图;FIG. 1 is a flow chart of generalized steps of a page dynamic configuration generation method provided by an embodiment of the present invention;
图2为本发明实施例提供的页面动态配置生成方法的详细步骤流程图;FIG. 2 is a flow chart of detailed steps of a page dynamic configuration generation method provided by an embodiment of the present invention;
图3为本发明实施例提供的页面动态配置生成方法涉及的表单设计器示意图;3 is a schematic diagram of a form designer involved in the page dynamic configuration generation method provided by the embodiment of the present invention;
图4为本发明实施例提供的页面动态配置生成方法涉及的表单页面展示示意图;FIG. 4 is a schematic diagram of displaying form pages involved in the page dynamic configuration generation method provided by the embodiment of the present invention;
图5为本发明实施例提供的页面动态配置生成方法涉及的模型表格设计器示意图;FIG. 5 is a schematic diagram of a model table designer involved in the page dynamic configuration generation method provided by the embodiment of the present invention;
图6为本发明实施例提供的页面动态配置生成方法涉及的列表页面展示示意图;FIG. 6 is a schematic diagram of displaying list pages involved in the page dynamic configuration generation method provided by the embodiment of the present invention;
图7为本发明实施例提供的页面动态配置生成方法涉及的模型定义、查询定义、表格定义与页面显示映射关系示意图;7 is a schematic diagram of the mapping relationship between model definition, query definition, table definition and page display involved in the page dynamic configuration generation method provided by the embodiment of the present invention;
图8为本发明实施例提供的页面动态配置生成方法涉及的表单定义与页面显示映射关系示意图;8 is a schematic diagram of the mapping relationship between form definition and page display involved in the page dynamic configuration generation method provided by the embodiment of the present invention;
图9为本发明实施例提供的页面动态配置生成装置中各功能模块之间的信号流向关系示意图;FIG. 9 is a schematic diagram of the signal flow relationship between functional modules in the page dynamic configuration generation device provided by the embodiment of the present invention;
图10为本发明实施例提供的硬件运行环境的页面动态配置生成设备结构示意图。FIG. 10 is a schematic structural diagram of a page dynamic configuration generation device for a hardware operating environment provided by an embodiment of the present invention.
具体实施方式detailed description
本发明为解决现有技术存在的问题,提供一种页面动态配置生成方法、装置、存储介质及电子设备,其通过在管理端简单的配置、勾选、拖拽方式、以达到实现快速动态的配置前端各个场景页面的展示效果的目的,从而更加适于实用。In order to solve the problems existing in the prior art, the present invention provides a dynamic page configuration generation method, device, storage medium and electronic equipment, which achieves fast and dynamic configuration through simple configuration, check, and drag methods at the management end. The purpose of configuring the display effect of each scene page on the front end is more suitable for practical use.
发明人经过长期的观察和使用体验,发现:After long-term observation and use experience, the inventor found that:
目前主流的开发方式已经步入了前管理端分离的模式,前端主要负责页面展示,管理端负责复杂的业务处理。前管理端通过约定相关API达到产品页面的最终展示。At present, the mainstream development method has entered the mode of separating the front-end management end. The front-end is mainly responsible for page display, and the management end is responsible for complex business processing. The front management end achieves the final display of the product page by agreeing on the relevant API.
把前端与管理端独立起来去开发,放在两个不同的服务器,需要独立部署。两个不同的工程,两个不同的代码库,不同的开发人员,前管理端工程师需要约定交互接口,实现同步开发。开发结束后需要进行独立部署,前端通过接口来调用管理端的应用程序编程接口。这种方式带来了一定的便利性。前端开发人员只需要关注页面的样式与动态数据的解析和渲染,而管理端开发人员专注于具体业务逻辑。The front-end and the management end are developed independently and placed on two different servers, which need to be deployed independently. Two different projects, two different code bases, different developers, and former management engineers need to agree on an interactive interface to achieve synchronous development. After the development is completed, independent deployment is required, and the front end calls the application programming interface of the management end through the interface. This approach brings certain convenience. Front-end developers only need to focus on page style and dynamic data parsing and rendering, while management developers focus on specific business logic.
前管理端的分离为现有的产品开发带来了很多的好处,但是在实际产品研发过程中的下列场景仍然需要开发人员通过代码的修改调整才能解决客户要求的问题。The separation of the front management end has brought many benefits to the existing product development, but the following scenarios in the actual product development process still require developers to modify and adjust the code to solve the problems required by customers.
在产品研制过程中不同企业各种业务模型以及各个场景页面中的属性并不是固定不变的,需要在后续的实施过程中根据具体客户个性化需要动态配置。In the process of product development, the various business models of different enterprises and the attributes in each scene page are not fixed, and need to be dynamically configured according to the individual needs of specific customers in the subsequent implementation process.
客户提出的业务模型以及各个场景页面中的属性会伴随着具体的业务的发展而需要调整。The business model proposed by the customer and the attributes in each scene page will need to be adjusted along with the development of the specific business.
不同的系统用户角色针对同样的业务对象关注的对象属性信息不同,需要开发多个不同的功能页面。Different system user roles focus on different object attribute information for the same business object, so multiple different function pages need to be developed.
目前针对于以上三种场景,通常处理方式是一旦客户提出业务模型或者各个场景页面的属性,展示效果等调整,通常是需要拉出产品的具体分支并由前端开发人员与管理端开发人员同时在具体分支修改代码,并将代码打包发布测试。然后由实施人员部署到各个客户应用现场的环境中。At present, for the above three scenarios, the usual processing method is that once the customer proposes the business model or the attributes of each scenario page, the display effect and other adjustments, it is usually necessary to pull out the specific branch of the product and the front-end developers and management developers at the same time. The specific branch modifies the code, and packages the code for release testing. Then it is deployed by implementers to the environment of each customer application site.
现有技术主要存在以下缺点:The prior art mainly has the following shortcoming:
(1)现有的技术不足以支撑不同企业业务模型及各个场景页面中的属性不确定性以及伴随具体业务的发展而需要调整页面显示时带来的产品重新修改代码,发布的问题。(1) The existing technology is not enough to support different enterprise business models and attribute uncertainty in each scene page, as well as the problem of product re-modification and release when the page display needs to be adjusted with the development of specific business.
(2)现有技术在具体的业务的发展而需要调整时带来的产品重新修改代码,发布的问题。(2) When the existing technology needs to be adjusted due to the development of the specific business, the product re-modifies the code and releases the problem.
(3)现有的技术不同的系统用户角色针对同样的业务对象关注的对象属性信息不同,需要开发多个不同的功能页面问题。(3) In the existing technology, different system user roles focus on different object attribute information for the same business object, and it is necessary to develop multiple different functional pages.
传统的研发设计需要开发人员编辑好前端页面代码与管理端逻辑代码,一旦遇到属性的增减,属性展示效果的调整,甚至相关属性的校验的调整都需要开发人员重新修改程序代码。重新发布程序包,重新部署到用户服务器才能实现。此过程不仅产生了很大的研发成本给用户带来了更多的支出,而且这个过程往往是一个漫长的过程,不能快速的响应用户的需求变化。Traditional R&D design requires developers to edit the front-end page code and management-side logic code. Once the increase or decrease of attributes, the adjustment of the display effect of attributes, and even the adjustment of the verification of related attributes require developers to re-modify the program code. This can only be achieved by republishing the package and redeploying it to the user's server. This process not only generates a lot of research and development costs, but also brings more expenditures to users, and this process is often a long process, which cannot quickly respond to changes in user needs.
为更进一步阐述本发明为达成预定发明目的所采取的技术手段及功效,以下结合附图及较佳实施例,对依据本发明提出的页面动态配置生成方法、装置、计算机可读存储介质及电子设备,其具体实施方式、结构、特征及其功效,详细说明如后。在下述说明中,不同的“一实施例”或“实施例”指的不一定是同一实施例。此外,一或多个实施例中的特征、结构、或特点可由任何合适形式组合。In order to further explain the technical means and effects adopted by the present invention to achieve the intended purpose of the invention, the page dynamic configuration generation method, device, computer-readable storage medium and electronic The device, its specific implementation, structure, features and functions thereof are described in detail below. In the following description, different "one embodiment" or "embodiment" do not necessarily refer to the same embodiment. Furthermore, the features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,具体的理解为:可以同时包含有A与B,可以单独存在A,也可以单独存在B,能够具备上述三种任一种情况。The term "and/or" in this article is just an association relationship describing associated objects, which means that there can be three relationships, for example, A and/or B. The specific understanding is: A and B can be included at the same time, and A and B can be included separately. A exists, B may exist alone, and any of the above three situations can be met.
术语解释Terminology Explanation
模型建模:就是建立模型,就是为了理解事物而对事物做出的一种抽象,是对事物的一种无歧义的书面描述。建立系统模型的过程,又称模型化。建模是研究系统的重要手段和前提。凡是用模型描述系统的因果关系或相互关系的过程都属于建模。Model modeling: It is to build a model, which is an abstraction of things in order to understand things, and an unambiguous written description of things. The process of building a system model is also called modeling. Modeling is an important means and premise of studying the system. Any process that uses a model to describe the causal relationship or mutual relationship of a system belongs to modeling.
动态建模:系统中允许动态的配置模型(即增删改子模型,增删改模型的属性后系统中自动加载修改后的模型,而不需要重新修改代码,重新发布程序包)。主要是为了解决PDM在实施中需要客户化的一种建模方式。Dynamic modeling: The system allows dynamic configuration models (that is, adding, deleting, and modifying sub-models, and after adding, deleting, and modifying model attributes, the system automatically loads the modified model without re-modifying the code and re-publishing the package). It is mainly to solve a modeling method that needs to be customized in the implementation of PDM.
表单设计器:即设计表单的控件,ElementUI表单设计及代码生成器,可将生成的代码直接运行在基于Element的vue项目中;也可导出JSON表单,使用配套的解析器将JSON解析成真实的表单。Form Designer: Design form controls, ElementUI form design and code generator, which can run the generated code directly in the Element-based vue project; can also export JSON forms, and use the supporting parser to parse JSON into real form.
业务对象:编写计算机应用程序过程中按业务领域识别和定义的数据实体。Business Object: A data entity identified and defined by business domain in the process of writing a computer application.
场景:根据页面展示的菜单以及角色等不同而定义的区分不同页面显示的情况。Scenario: It is defined according to the menus and roles displayed on the page to distinguish the display of different pages.
表单:在网页中主要负责数据采集功能。一个表单有三个基本组成部分:表单标签:这里面包含了处理表单数据所用公共网关接口(Common Gateway Interface,CGI)程序的URL以及数据提交到服务器的方法。Form: It is mainly responsible for the data collection function in the web page. A form has three basic components: Form label: This contains the URL of the Common Gateway Interface (CGI) program used to process the form data and the method for submitting the data to the server.
表单域:包含了文本框、密码框、隐藏域、多行文本框、复选框、单选框、下拉选择框和文件上传框等。表单按钮:包括提交按钮、复位按钮和一般按钮;用于将数据传送到服务器上的CGI脚本或者取消输入,还可以用表单按钮来控制其他定义了处理脚本的处理工作。Form field: contains text box, password box, hidden field, multi-line text box, check box, radio box, drop-down selection box and file upload box, etc. Form buttons: including submit buttons, reset buttons and general buttons; used to transmit data to CGI scripts on the server or cancel input, and form buttons can also be used to control other processing tasks that define processing scripts.
表格:在网页中以列表的形式展示业务对象数据信息的控件。Table: A control that displays business object data information in the form of a list on a web page.
Vue技术:一款流行的JavaScript前端框架,是一个用于创建用户界面的开源JavaScript框架,也是一个创建单页应用的Web应用框架。Vue technology: a popular JavaScript front-end framework, an open source JavaScript framework for creating user interfaces, and a web application framework for creating single-page applications.
页面动态配置生成方法Page dynamic configuration generation method
参见附图1、附图3-8,本发明实施例提供的页面动态配置生成方法包括以下步骤:Referring to accompanying
步骤S1:获取待生成页面的当前场景当前模型配置;Step S1: Obtain the current model configuration of the current scene of the page to be generated;
步骤S2:根据待生成页面的当前场景当前模型配置,确认待生成页面的当前场景配置是否存在;Step S2: According to the current model configuration of the current scene of the page to be generated, confirm whether the current scene configuration of the page to be generated exists;
步骤S3:若待生成页面的当前场景配置存在,获取待生成页面当前模型默认配置;Step S3: If the current scene configuration of the page to be generated exists, obtain the default configuration of the current model of the page to be generated;
步骤S4:根据待生成页面当前模型默认配置,确认待生成页面的当前模型默认场景配置是否存在;Step S4: According to the default configuration of the current model of the page to be generated, confirm whether the default scene configuration of the current model of the page to be generated exists;
步骤S5:若待生成页面的当前模型默认场景配置存在,动态加载待生成页面的表单定义、表格定义、查询定义,生成待生成页面。Step S5: If the current model default scene configuration of the page to be generated exists, dynamically load the form definition, form definition, and query definition of the page to be generated, and generate the page to be generated.
本发明提供的页面动态配置生成方法将模型建模与表单设计器相结合,通过在管理端简单的配置,勾选,拖拽方式、以达到实现快速动态的配置前端各个场景页面的展示效果的目的。解决产品针对不同企业业务模型以及各个场景页面中的属性也不同的个性化配置问题。同时解决大部分客户需求中对模型属性增减,表单、表格、查询条件展示调整,必填、校验及提示等调整带来的需要重新修改代码,发布程序包的问题。通过页面中预定义场景身份标识以及模型的父子继承关系,达到增删改调整子模型以及模型属性后不需要开发人员介入的情况下动态调整页面的目的。同时通过不同角色用户预定义不同的场景身份标识可以实现同一个业务页面针对不同角色关注内容的不同动态显示的目的。所有配置定义信息支持导出,导入excel功能。导出系统的初始设置excel文件后,可以便于现场实施人员与客户沟通业务模型,同时实施人员与用户沟通后可以直接在excel中修改相关信息。修改后直接导入系统相应的调整即可生效,其大大提高了产品定制的实施效率。The page dynamic configuration generation method provided by the present invention combines model modeling with a form designer, and achieves fast and dynamic configuration of the display effect of each scene page on the front end through simple configuration, check, and drag and drop methods on the management side. Purpose. Solve the personalized configuration problem that the product is different for different enterprise business models and attributes in each scene page. At the same time, it solves the problems that most of the customer needs need to re-modify the code and release the package due to the increase or decrease of model attributes, the adjustment of form, table, and query condition display, the adjustment of required fields, verification, and prompts. Through the pre-defined scene identity and the parent-child inheritance relationship of the model in the page, the purpose of dynamically adjusting the page after adding, deleting, modifying and adjusting the sub-model and model attributes is achieved without the intervention of the developer. At the same time, by predefining different scene identities for users with different roles, the purpose of different dynamic display of the same business page for different role-focused content can be realized. All configuration definition information supports export and import excel functions. After exporting the initial setting excel file of the system, it is convenient for on-site implementers to communicate with customers about the business model, and at the same time, implementers can directly modify relevant information in excel after communicating with users. After the modification, it can be directly imported into the system and the corresponding adjustment can take effect, which greatly improves the implementation efficiency of product customization.
本实施例中,In this example,
管理员在管理端维护模型信息:The administrator maintains model information on the management side:
通过设置模型与数据库存储表、业务对象JAVA类关系,将模型、JAVA处理类、数据库存储表结合在一起为程序的实现奠定基础。通过设置模型的相关的页面表单场景,表格的场景为后续的表单场景选择,表跟场景选择做准备。同时可以设置一些诸如唯一性校验属性id集合,防篡改等针对于模型级别的配置。By setting the relationship between the model and the database storage table and the business object JAVA class, the combination of the model, the JAVA processing class and the database storage table lays the foundation for the realization of the program. By setting the related page form scene of the model, the table scene is prepared for the subsequent form scene selection, table and scene selection. At the same time, you can set some configurations for the model level, such as the uniqueness check attribute id set, tamper-proof, etc.
管理员在管理端维护模型属性信息:The administrator maintains model attribute information on the management side:
可以设置模型属性的身份标识、名称、数据类型、长度、数据字典、格式化器是否重载等属性自身信息。同时可以配置属性是否可以参与到后续的表单配置、表格配置、查询配置,导入配置等。You can set the identity, name, data type, length, data dictionary, and whether the formatter is overloaded and other attribute information of the model attribute. At the same time, you can configure whether attributes can participate in subsequent form configuration, table configuration, query configuration, import configuration, etc.
管理员在管理端设置表单属性与表单定义:The administrator sets form properties and form definitions on the management side:
表单属性form attribute
管理员在管理端配置可以参与到表单定义的表单属性相关信息。其中包含表单中模型属性显示名称、表单中展示组件类型(例如:单行文本、下拉选择,级联选择以及自定义组件等)、是否必填、静态默认值,动态默认值(例如:今天、今年,当前用户,当前用户组织,密级等)、数据字典、属性校验规则以及提示信息等。同时提供表单属性的重载功能。The administrator configures information related to form attributes that can participate in the form definition on the management side. It includes the display name of the model attribute in the form, the display component type in the form (for example: single-line text, drop-down selection, cascade selection, and custom components, etc.), whether it is required, static default value, dynamic default value (for example: today, this year , current user, current user organization, confidentiality level, etc.), data dictionary, attribute verification rules and prompt information, etc. At the same time, it provides the overloading function of form attributes.
表单定义form definition
管理员在管理端配置各个场景的页面表单定义。在创建某种场景的表单定义后,弹出模型表单设计器,在页面中可以将左侧表单属性中的属性拖拽到表单页面设计区域,同时支持页面的属性控件拖拽调整布局,以及属性的场景个性化设置属性显示名称、属性数据字典、是否必填、默认值、属性校验规则以及提示信息等。同时提供表单定义的重载与复制新建功能。The administrator configures the page form definition of each scene on the management side. After creating a form definition of a certain scene, the model form designer will pop up, and on the page, you can drag and drop the attributes in the form attributes on the left to the form page design area. Scenario personalization settings attribute display name, attribute data dictionary, whether it is required, default value, attribute verification rules, and prompt information, etc. At the same time, it provides the functions of overloading and duplicating the definition of the form.
管理员在管理端配置表格属性与表格定义:The administrator configures table properties and table definitions on the management side:
表格属性form properties
管理员在管理端配置可以参与到表格定义的表格属性相关信息。其中包含表格中模型属性显示名称、表格中属性显示类型(例如:文本、图标)、列对齐方式,列宽度、是否排序等。同时提供表格属性的重载功能。The administrator configures information related to table attributes that can participate in the table definition on the management side. It includes the display name of the model attribute in the table, the display type of the attribute in the table (for example: text, icon), column alignment, column width, whether to sort, etc. At the same time, it provides the overloading function of table attributes.
表格定义table definition
管理员在管理端配置各个场景的页面表格。在创建某种场景的表格定义后,弹出模型表格设计器,在页面中可以将表格属性中的属性点选到表格页面设计区域,同时支持页面的属性显示名称、显示顺序、列对齐方式、列宽度、是否多行显示的场景级再次个性化设置。同时提供表格定义的重载与复制新建功能以及配置后表格页面的预览功能。The administrator configures the page form of each scene on the management side. After creating a table definition for a certain scene, the model table designer will pop up, and you can click the attributes in the table properties to the table page design area on the page, and at the same time support the page attribute display name, display order, column alignment, column The scene level of width and whether to display in multiple lines can be personalized again. At the same time, it provides the function of overloading and copying the table definition and the preview function of the table page after configuration.
管理员在管理端配置查询属性与查询定义:The administrator configures query properties and query definitions on the management side:
查询属性query properties
管理员在管理端配置可以参与到查询定义的查询属性相关信息。其中包含表单中显示的模型属性的名称、表单中展示组件的类型(例如:单行文本、下拉选择,级联选择以及自定义组件等)、数据字典、属性校验规则以及提示信息、比较符(例如:等于、匹配、包含、大于、小于等)、以及可参与的搜索类型(例如:模糊检索、精确检索、筛选检索、全文检索等)。The administrator configures information related to query attributes that can participate in the query definition on the management side. It includes the name of the model attribute displayed in the form, the type of the component displayed in the form (for example: single-line text, drop-down selection, cascading selection, and custom components, etc.), data dictionary, attribute validation rules and prompt information, comparators ( For example: equal to, match, contain, greater than, less than, etc.), and the search types that can be participated in (for example: fuzzy search, exact search, screening search, full-text search, etc.).
查询定义query definition
管理员在管理端配置各个场景的页面查询定义。在创建某种场景的查询定义后,弹出模型表单设计器,在页面中可以将左侧表单属性中的属性拖拽到表单页面设计区域,同时支持页面的属性控件拖拽调整布局,以及属性的场景个性化设置属性显示名称、属性数据字典、是否必填、默认值、属性校验规则以及提示信息等。The administrator configures page query definitions for each scenario on the management side. After creating a query definition for a certain scene, the model form designer will pop up, and on the page, you can drag and drop the attributes in the form attributes on the left to the form page design area. Scenario personalization settings attribute display name, attribute data dictionary, whether it is required, default value, attribute verification rules, and prompt information, etc.
其中,参见附图2,根据待生成页面的当前场景当前模型配置,确认待生成页面的当前场景配置是否存在的步骤过程中,若待生成页面的当前场景配置不存在,还包括以下步骤:Wherein, referring to accompanying drawing 2, according to the current model configuration of the current scene of the page to be generated, during the step of confirming whether the current scene configuration of the page to be generated exists, if the current scene configuration of the page to be generated does not exist, the following steps are also included:
获取待生成页面的当前模型的父模型的当前场景配置;Obtain the current scene configuration of the parent model of the current model of the page to be generated;
根据待生成页面的当前模型的父模型的当前场景配置,确认待生成页面的当前场景配置是否存在:According to the current scene configuration of the parent model of the current model of the page to be generated, confirm whether the current scene configuration of the page to be generated exists:
若待生成页面的当前场景配置存在,获取待生成页面当前模型默认配置;If the current scene configuration of the page to be generated exists, obtain the default configuration of the current model of the page to be generated;
若待生成页面的当前场景配置不存在,确认待生成页面的当前模型的父模型的当前场景配置是否为待生成页面的当前模型的根模型,If the current scene configuration of the page to be generated does not exist, confirm whether the current scene configuration of the parent model of the current model of the page to be generated is the root model of the current model of the page to be generated,
若待生成页面的当前模型的父模型的当前场景配置是待生成页面的当前模型的根模型,获取待生成页面当前模型默认配置,If the current scene configuration of the parent model of the current model of the page to be generated is the root model of the current model of the page to be generated, obtain the default configuration of the current model of the page to be generated,
若待生成页面的当前模型的父模型的当前场景配置不是待生成页面的当前模型的根模型,返回获取待生成页面的当前模型的父模型的当前场景配置。If the current scene configuration of the parent model of the current model of the page to be generated is not the root model of the current model of the page to be generated, return the current scene configuration of the parent model of the current model of the page to be generated.
其中,参见附图2,根据待生成页面当前模型默认配置,确认待生成页面的当前模型默认场景配置是否存在的步骤过程中,若待生成页面的当前模型默认场景配置不存在,还包括以下步骤:Among them, referring to Figure 2, according to the default configuration of the current model of the page to be generated, during the step of confirming whether the default scene configuration of the current model of the page to be generated exists, if the default scene configuration of the current model of the page to be generated does not exist, the following steps are also included :
获取待生成页面的当前模型的父模型的默认场景配置;Get the default scene configuration of the parent model of the current model of the page to be generated;
根据待生成页面的当前模型的父模型的默认场景配置,确认待生成页面的默认场景配置是否存在:According to the default scene configuration of the parent model of the current model of the page to be generated, confirm whether the default scene configuration of the page to be generated exists:
若当前模型的父模型的默认场景配置存在,动态加载待生成页面的表单定义、表格定义、查询定义,生成待生成页面,If the default scene configuration of the parent model of the current model exists, dynamically load the form definition, table definition, and query definition of the page to be generated, and generate the page to be generated.
若当前模型的父模型的默认场景配置不存在,获取待生成页面的当前模型的父模型的默认场景配置,If the default scene configuration of the parent model of the current model does not exist, get the default scene configuration of the parent model of the current model of the page to be generated,
根据待生成页面的当前模型的父模型的默认场景配置,确认当前模型的父模型的默认场景配置是否存在,According to the default scene configuration of the parent model of the current model of the page to be generated, confirm whether the default scene configuration of the parent model of the current model exists,
若当前模型的父模型的默认场景配置存在,动态加载待生成页面的表单定义、表格定义、查询定义,生成待生成页面,If the default scene configuration of the parent model of the current model exists, dynamically load the form definition, table definition, and query definition of the page to be generated, and generate the page to be generated.
若当前模型的父模型的默认场景配置不存在,确认待生成页面的当前模型的父模型的默认场景配置是否为待生成页面的默认模型的根模型,If the default scene configuration of the parent model of the current model does not exist, confirm whether the default scene configuration of the parent model of the current model of the page to be generated is the root model of the default model of the page to be generated,
若待生成页面的当前模型的父模型的默认场景配置是待生成页面的默认模型的根模型,终止待生成页面的生成;If the default scene configuration of the parent model of the current model of the page to be generated is the root model of the default model of the page to be generated, terminate the generation of the page to be generated;
若待生成页面的当前模型的父模型的默认场景配置不是待生成页面的默认模型的根模型,返回获取待生成页面的当前模型的父模型的默认场景配置。If the default scene configuration of the parent model of the current model of the page to be generated is not the root model of the default model of the page to be generated, return to obtain the default scene configuration of the parent model of the current model of the page to be generated.
其中,获取待生成页面的当前模型的父模型的当前场景配置的步骤过程中,若待生成页面的当前模型存在个性化需求,还包括以下步骤:Wherein, during the step of obtaining the current scene configuration of the parent model of the current model of the page to be generated, if the current model of the page to be generated has individual requirements, the following steps are also included:
重载待生成页面的当前模型的父模型的配置;Overload the configuration of the parent model of the current model of the page to be generated;
根据待生成页面的当前模型的个性化需求,进行个性化修改,得到修改后的待生成页面的当前模型的父模型的配置,使得修改后的待生成页面的当前模型的父模型的配置与待生成页面的当前模型的个性化需求相适应。According to the personalized requirements of the current model of the page to be generated, carry out personalized modification, and obtain the configuration of the parent model of the current model of the page to be generated after modification, so that the configuration of the parent model of the current model of the page to be generated after modification is the same as that of the parent model of the page to be generated Adapt to the individual needs of the current model of the generated page.
其中,获取待生成页面的当前场景当前模型配置的步骤过程中,待生成页面的当前场景当前模型配置包括身份标识、名称、数据类型、数据长度、数据字典、格式化器、是否可以参与到后续的表单配置、表格配置、查询配置,导入配置中的一种或者多种属性信息。Among them, during the step of obtaining the current model configuration of the current scene of the page to be generated, the current model configuration of the current scene of the page to be generated includes identity, name, data type, data length, data dictionary, formatter, and whether it can participate in subsequent Form configuration, table configuration, query configuration, import one or more attribute information in the configuration.
其中,若待生成页面的当前模型默认场景配置存在,动态加载待生成页面的表单定义、表单定义、查询定义,生成待生成页面的步骤过程中,Among them, if the default scene configuration of the current model of the page to be generated exists, dynamically load the form definition, form definition, and query definition of the page to be generated, and during the step of generating the page to be generated,
动态加载待生成页面的表单定义具体包括以下步骤:The dynamic loading of the form definition of the page to be generated specifically includes the following steps:
待生成页面的前端页面在涉及到新建、编辑、详情等表单的页面中通过在页面中预定义与表单定义中相同的场景身份标识,根据场景身份标识,找到具体的表单定义的模板页面,通过Vue软件的前端动态加载技术,将配置的表单定义动态加载到待生成页面中;The front-end page of the page to be generated finds the template page of the specific form definition by predefining the same scene ID as the form definition in the page involving the new, edit, and detail forms, according to the scene ID. The front-end dynamic loading technology of Vue software dynamically loads the configured form definition into the page to be generated;
动态加载待生成页面的表格定义具体包括以下步骤:The dynamic loading of the table definition of the page to be generated specifically includes the following steps:
待生成页面的前端页面在涉及到列表表格展示的页面中通过在页面中预定义与表格定义中相同的场景身份标识,根据场景标识找到具体的表格定义的模板页面,通过Vue软件的前端动态加载技术,将配置的表格定义动态加载到页面中;For the front-end page of the page to be generated, in the page related to the display of the list table, the same scene identity as that in the table definition is predefined in the page, and the template page of the specific table definition is found according to the scene identity, and dynamically loaded by the front-end of the Vue software technology, dynamically load the configured table definition into the page;
动态加载待生成页面的查询定义具体包括以下步骤:The dynamic loading of the query definition of the page to be generated specifically includes the following steps:
待生成页面的前端页面在涉及到查询表单的页面中通过在页面中预定义与表单定义中相同的场景身份标识,根据场景身份标识找到具体的表单定义的模板页面,通过Vue软件的前端动态加载技术,将配置的查询表单定义动态加载到页面中。For the front-end page of the page to be generated, in the page related to the query form, the same scene identity as that in the form definition is predefined in the page, and the template page of the specific form definition is found according to the scene identity, and dynamically loaded by the front-end of the Vue software technology to dynamically load the configured query form definition into the page.
其中,若待生成页面的当前模型默认场景配置存在,动态加载待生成页面的表单定义、表单定义、查询定义,生成待生成页面的步骤过程中,Among them, if the default scene configuration of the current model of the page to be generated exists, dynamically load the form definition, form definition, and query definition of the page to be generated, and during the step of generating the page to be generated,
动态加载待生成页面的表单定义具体还包括以下步骤:The dynamic loading of the form definition of the page to be generated specifically includes the following steps:
在待生成页面的前端页面中需要加载某一类模型的定义作为展示根模型定义,加载过程中根据模型的继承关系,动态加载所有子模型的定义,实现页面的表单动态生成展示效果;In the front-end page of the page to be generated, the definition of a certain type of model needs to be loaded as the display root model definition. During the loading process, the definitions of all sub-models are dynamically loaded according to the inheritance relationship of the model, so as to realize the dynamic generation and display effect of the form of the page;
动态加载待生成页面的表格定义具体还包括以下步骤:The dynamic loading of the table definition of the page to be generated specifically includes the following steps:
待生成页面表格的显示列同时支持用户级别的个性化设置,在表格的设置功能中提供用户级属性列表的显示设置以及属性的排列顺序的设置,同时支持恢复系统默认配置功能;The display column of the page table to be generated also supports user-level personalization settings. In the table setting function, the display setting of the user-level attribute list and the setting of the arrangement order of the attributes are provided, and the function of restoring the system default configuration is also supported;
动态加载待生成页面的查询定义具体还包括以下步骤:The dynamic loading of the query definition of the page to be generated specifically includes the following steps:
在待生成页面前端页面中需要加载某一类模型的定义作为展示根模型定义,加载过程中根据模型的继承关系,动态加载所有子模型的定义,从而实现页面的表单动态生成展示效果。In the front-end page of the page to be generated, the definition of a certain type of model needs to be loaded as the display root model definition. During the loading process, the definitions of all sub-models are dynamically loaded according to the inheritance relationship of the model, so as to realize the dynamic generation and display effect of the page form.
页面动态配置生成装置Page dynamic configuration generation device
参见附图9,本发明实施例提供的页面动态配置生成装置包括:Referring to Figure 9, the page dynamic configuration generation device provided by the embodiment of the present invention includes:
当前场景当前模型配置获取模块,用于获取待生成页面的当前场景当前模型配置;The current scene current model configuration acquisition module is used to obtain the current scene current model configuration of the page to be generated;
第一确认模块,用于根据待生成页面的当前场景当前模型配置,确认待生成页面的当前场景配置是否存在;The first confirmation module is used to confirm whether the current scene configuration of the page to be generated exists according to the current model configuration of the current scene of the page to be generated;
当前模型默认配置获取模块,若待生成页面的当前场景配置存在,用于获取待生成页面当前模型默认配置;The default configuration acquisition module of the current model, if the current scene configuration of the page to be generated exists, it is used to obtain the default configuration of the current model of the page to be generated;
第二确认模块,用于根据待生成页面当前模型默认配置,确认待生成页面的当前模型默认场景配置是否存在;The second confirmation module is used to confirm whether the default scene configuration of the current model of the page to be generated exists according to the default configuration of the current model of the page to be generated;
动态加载模块,若待生成页面的当前模型默认场景配置存在,用于动态加载待生成页面的表单定义、表格定义、查询定义,生成待生成页面。The dynamic loading module, if the default scene configuration of the current model of the page to be generated exists, is used to dynamically load the form definition, table definition, and query definition of the page to be generated, and generate the page to be generated.
本发明提供的页面动态配置生成装置将模型建模与表单设计器相结合,通过在管理端简单的配置,勾选,拖拽方式、以达到实现快速动态的配置前端各个场景页面的展示效果的目的。解决产品针对不同企业业务模型以及各个场景页面中的属性也不同的个性化配置问题。同时解决大部分客户需求中对模型属性增减,表单、表格、查询条件展示调整,必填、校验及提示等调整带来的需要重新修改代码,发布程序包的问题。通过页面中预定义场景身份标识以及模型的父子继承关系,达到增删改调整子模型以及模型属性后不需要开发人员介入的情况下动态调整页面的目的。同时通过不同角色用户预定义不同的场景身份标识可以实现同一个业务页面针对不同角色关注内容的不同动态显示的目的。所有配置定义信息支持导出,导入excel功能。导出系统的初始设置excel文件后,可以便于现场实施人员与客户沟通业务模型,同时实施人员与用户沟通后可以直接在excel中修改相关信息。修改后直接导入系统相应的调整即可生效,其大大提高了产品定制的实施效率。The page dynamic configuration generation device provided by the present invention combines model modeling with a form designer, and achieves fast and dynamic configuration of the display effect of each scene page on the front end through simple configuration, check, and dragging at the management end. Purpose. Solve the personalized configuration problem that the product is different for different enterprise business models and attributes in each scene page. At the same time, it solves the problems that most of the customer needs need to re-modify the code and release the package due to the increase or decrease of model attributes, the adjustment of form, table, and query condition display, the adjustment of required fields, verification, and prompts. Through the pre-defined scene identity and the parent-child inheritance relationship of the model in the page, the purpose of dynamically adjusting the page after adding, deleting, modifying and adjusting the sub-model and model attributes is achieved without the intervention of the developer. At the same time, by predefining different scene identities for users with different roles, the purpose of different dynamic display of the same business page for different role-focused content can be realized. All configuration definition information supports export and import excel functions. After exporting the initial setting excel file of the system, it is convenient for on-site implementers to communicate with customers about the business model, and at the same time, implementers can directly modify relevant information in excel after communicating with users. After the modification, it can be directly imported into the system and the corresponding adjustment can take effect, which greatly improves the implementation efficiency of product customization.
计算机可读存储介质computer readable storage medium
本发明实施例提供的计算机可读存储介质上存储有页面动态配置生成程序,页面动态配置生成程序在被处理器执行时,实现本发明提供的页面动态配置生成方法的步骤。The computer-readable storage medium provided by the embodiment of the present invention stores a page dynamic configuration generation program, and when the page dynamic configuration generation program is executed by a processor, the steps of the page dynamic configuration generation method provided by the present invention are implemented.
本发明提供的计算机可读存储介质将模型建模与表单设计器相结合,通过在管理端简单的配置,勾选,拖拽方式、以达到实现快速动态的配置前端各个场景页面的展示效果的目的。解决产品针对不同企业业务模型以及各个场景页面中的属性也不同的个性化配置问题。同时解决大部分客户需求中对模型属性增减,表单、表格、查询条件展示调整,必填、校验及提示等调整带来的需要重新修改代码,发布程序包的问题。通过页面中预定义场景身份标识以及模型的父子继承关系,达到增删改调整子模型以及模型属性后不需要开发人员介入的情况下动态调整页面的目的。同时通过不同角色用户预定义不同的场景身份标识可以实现同一个业务页面针对不同角色关注内容的不同动态显示的目的。所有配置定义信息支持导出,导入excel功能。导出系统的初始设置excel文件后,可以便于现场实施人员与客户沟通业务模型,同时实施人员与用户沟通后可以直接在excel中修改相关信息。修改后直接导入系统相应的调整即可生效,其大大提高了产品定制的实施效率。The computer-readable storage medium provided by the present invention combines model modeling with a form designer, and achieves fast and dynamic configuration of the display effect of each scene page on the front end through simple configuration, check, and dragging at the management end. Purpose. Solve the personalized configuration problem that the product is different for different enterprise business models and attributes in each scene page. At the same time, it solves the problems that most of the customer needs need to re-modify the code and release the package due to the increase or decrease of model attributes, the adjustment of form, table, and query condition display, the adjustment of required fields, verification, and prompts. Through the pre-defined scene identity and the parent-child inheritance relationship of the model in the page, the purpose of dynamically adjusting the page after adding, deleting, modifying and adjusting the sub-model and model attributes is achieved without the intervention of the developer. At the same time, by predefining different scene identities for users with different roles, the purpose of different dynamic display of the same business page for different role-focused content can be realized. All configuration definition information supports export and import excel functions. After exporting the initial setting excel file of the system, it is convenient for on-site implementers to communicate with customers about the business model, and at the same time, implementers can directly modify relevant information in excel after communicating with users. After the modification, it can be directly imported into the system and the corresponding adjustment can take effect, which greatly improves the implementation efficiency of product customization.
电子设备Electronic equipment
参见附图10,本发明实施例提供的电子设备包括存储器和处理器,存储器上存储有页面动态配置生成程序,页面动态配置生成程序在被处理器执行时,实现本发明提供的页面动态配置生成方法的步骤。Referring to Figure 10, the electronic device provided by the embodiment of the present invention includes a memory and a processor, and a page dynamic configuration generation program is stored on the memory, and when the page dynamic configuration generation program is executed by the processor, the page dynamic configuration generation provided by the present invention is realized. method steps.
本发明提供的电子设备将模型建模与表单设计器相结合,通过在管理端简单的配置,勾选,拖拽方式、以达到实现快速动态的配置前端各个场景页面的展示效果的目的。解决产品针对不同企业业务模型以及各个场景页面中的属性也不同的个性化配置问题。同时解决大部分客户需求中对模型属性增减,表单、表格、查询条件展示调整,必填、校验及提示等调整带来的需要重新修改代码,发布程序包的问题。通过页面中预定义场景身份标识以及模型的父子继承关系,达到增删改调整子模型以及模型属性后不需要开发人员介入的情况下动态调整页面的目的。同时通过不同角色用户预定义不同的场景身份标识可以实现同一个业务页面针对不同角色关注内容的不同动态显示的目的。所有配置定义信息支持导出,导入excel功能。导出系统的初始设置excel文件后,可以便于现场实施人员与客户沟通业务模型,同时实施人员与用户沟通后可以直接在excel中修改相关信息。修改后直接导入系统相应的调整即可生效,其大大提高了产品定制的实施效率。The electronic device provided by the present invention combines model modeling with a form designer, and achieves the purpose of quickly and dynamically configuring the display effect of each scene page on the front end through simple configuration, check, and dragging at the management end. Solve the personalized configuration problem that the product is different for different enterprise business models and attributes in each scene page. At the same time, it solves the problems that most of the customer needs need to re-modify the code and release the package due to the increase or decrease of model attributes, the adjustment of form, table, and query condition display, the adjustment of required fields, verification, and prompts. Through the pre-defined scene identity and the parent-child inheritance relationship of the model in the page, the purpose of dynamically adjusting the page after adding, deleting, modifying and adjusting the sub-model and model attributes is achieved without the intervention of the developer. At the same time, by predefining different scene identities for users with different roles, the purpose of different dynamic display of the same business page for different role-focused content can be realized. All configuration definition information supports export and import excel functions. After exporting the initial setting excel file of the system, it is convenient for on-site implementers to communicate with customers about the business model, and at the same time, implementers can directly modify relevant information in excel after communicating with users. After the modification, it can be directly imported into the system and the corresponding adjustment can take effect, which greatly improves the implementation efficiency of product customization.
参照图10,图10为本发明实施例方案涉及的硬件运行环境的页面动态配置生成设备结构示意图。Referring to FIG. 10 , FIG. 10 is a schematic structural diagram of a page dynamic configuration generation device for a hardware operating environment involved in the solution of the embodiment of the present invention.
如图10所示,该页面动态配置生成设备可以包括:处理器1001,例如中央处理器(Central Processing Unit,CPU),通信总线1002、用户接口1003,网络接口1004,存储器1005。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如无线保真(WIreless-FIdelity,WI-FI)接口)。存储器1005可以是高速的随机存取存储器(RandomAccess Memory,RAM)存储器,也可以是稳定的非易失性存储器(Non-VolatileMemory,NVM),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。As shown in FIG. 10 , the page dynamic configuration generation device may include: a
本领域技术人员可以理解,图10中示出的结构并不构成对页面动态配置生成设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the structure shown in Figure 10 does not constitute a limitation to the page dynamic configuration generation device, and may include more or less components than those shown in the illustration, or combine certain components, or arrange different components .
如图10所示,作为一种存储介质的存储器1005中可以包括操作系统、数据存储模块、网络通信模块、用户接口模块以及页面动态配置生成程序。As shown in FIG. 10 , the
在图10所示的页面动态配置生成设备中,网络接口1004主要用于与网络服务器进行数据通信;用户接口1003主要用于与用户进行数据交互;本发明页面动态配置生成设备中的处理器1001、存储器1005可以设置在页面动态配置生成设备中,页面动态配置生成设备通过处理器1001调用存储器1005中存储的页面动态配置生成程序,并执行本发明实施例提供的页面动态配置生成方法。In the page dynamic configuration generation device shown in Figure 10, the
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。While preferred embodiments of the invention have been described, additional changes and modifications to these embodiments can be made by those skilled in the art once the basic inventive concept is appreciated. Therefore, it is intended that the appended claims be construed to cover the preferred embodiment as well as all changes and modifications which fall within the scope of the invention.
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and equivalent technologies thereof, the present invention also intends to include these modifications and variations.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211087332.9A CN115421721A (en) | 2022-09-07 | 2022-09-07 | Page dynamic configuration generation method and device, storage medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211087332.9A CN115421721A (en) | 2022-09-07 | 2022-09-07 | Page dynamic configuration generation method and device, storage medium and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115421721A true CN115421721A (en) | 2022-12-02 |
Family
ID=84202842
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211087332.9A Pending CN115421721A (en) | 2022-09-07 | 2022-09-07 | Page dynamic configuration generation method and device, storage medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115421721A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030014442A1 (en) * | 2001-07-16 | 2003-01-16 | Shiigi Clyde K. | Web site application development method using object model for managing web-based content |
US20070033595A1 (en) * | 2005-08-04 | 2007-02-08 | International Business Machines Corporation | Interleaving the XForms processing model with Java server faces request processing |
WO2021008030A1 (en) * | 2019-07-12 | 2021-01-21 | 平安科技(深圳)有限公司 | Web form configuration method and device, and computer readable storage medium |
WO2021013226A1 (en) * | 2019-07-25 | 2021-01-28 | 华为技术有限公司 | Interface generation method and device |
CN114217800A (en) * | 2021-12-21 | 2022-03-22 | 北京达佳互联信息技术有限公司 | Page generation method and device, electronic equipment and storage medium |
CN114281323A (en) * | 2021-03-30 | 2022-04-05 | 北京百特运通科技有限公司 | A method and system for generating a front-end form |
-
2022
- 2022-09-07 CN CN202211087332.9A patent/CN115421721A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030014442A1 (en) * | 2001-07-16 | 2003-01-16 | Shiigi Clyde K. | Web site application development method using object model for managing web-based content |
US20070033595A1 (en) * | 2005-08-04 | 2007-02-08 | International Business Machines Corporation | Interleaving the XForms processing model with Java server faces request processing |
WO2021008030A1 (en) * | 2019-07-12 | 2021-01-21 | 平安科技(深圳)有限公司 | Web form configuration method and device, and computer readable storage medium |
WO2021013226A1 (en) * | 2019-07-25 | 2021-01-28 | 华为技术有限公司 | Interface generation method and device |
CN114281323A (en) * | 2021-03-30 | 2022-04-05 | 北京百特运通科技有限公司 | A method and system for generating a front-end form |
CN114217800A (en) * | 2021-12-21 | 2022-03-22 | 北京达佳互联信息技术有限公司 | Page generation method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114035773B (en) | Configuration-based low-code form development method, system and device | |
CN107818143B (en) | Page configuration and generation method and device | |
US20190187967A1 (en) | Generation of dynamic software models using input mapping with feature definitions | |
US8584082B2 (en) | System for dynamic discovery, configuration, and development of process-bound widgets | |
CN103218225B (en) | A kind of unified survey sends out control software development system | |
US10331765B2 (en) | Methods and apparatus for translating forms to native mobile applications | |
US8549472B1 (en) | System and method for web design | |
US8930824B2 (en) | Facilitating propagation of user interface patterns or themes | |
JP7209306B2 (en) | Online work system for Excel documents based on templates | |
WO2017028611A1 (en) | Form implementation method and apparatus | |
US10318126B2 (en) | Data-driven schema for describing and executing management tasks in a graphical user interface | |
WO2008147616A1 (en) | System and method for rapid development of software applications | |
CN104798067A (en) | Web server system, dictionary system, dictionary calling method, screen control display method, and demonstration application generation method | |
CN111752921A (en) | Seed resource information management system | |
CN115983226A (en) | Automatic creating method and device of form template, electronic equipment and storage medium | |
CN110244934A (en) | Product demand document, the generation method and device for testing information | |
US12141558B2 (en) | System and method for tailoring a customizer for integration process modeling visual element to a domain specific language for business integrations | |
US20120260237A1 (en) | Portable Business Language and Automated Software Application Development System | |
US11544241B1 (en) | System and method for generating and managing pseudo data fields in CRM | |
CN115422221A (en) | A query construction method, query builder, device and medium for a webpage form | |
CN119150836A (en) | Financial product report generation method and device based on interactive configuration | |
US20100318889A1 (en) | Automatic Insertion of Data from Web Forms into Documents | |
CN118656110A (en) | Page configuration method and device | |
KR101730070B1 (en) | Method for providing webpage in SaaS ENVIRONMENT, Computer program for the same, and Recording medium storing computer program for the same | |
CN115421721A (en) | Page dynamic configuration generation method and device, storage medium and electronic equipment |
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 |