npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

za-dplatform-adaptor

v1.0.75

Published

# 使用改工具包的项目 1、商品中心 预览和创建投保流程配置的时候 2、模版工具 创建 3、投保流程配置 一键重置

Downloads

43

Readme

umi project

使用改工具包的项目

1、商品中心 预览和创建投保流程配置的时候 2、模版工具 创建 3、投保流程配置 一键重置

Getting Started

模板工具

http://27842-zat-caerus-template-biz.test.za-tech.net/swagger-ui.html#/template45controller

商品

http://zat-caerus-bops.test.za-tech.net/swagger-ui.html#!/218302169730456208512638121153/queryGoodsStructureUsingPOST

优化点

  • 适配可以直接接受模板str和商品data进行适配
  • 支持模块级别适配
  • 支持单页面适配
  • 查询商品信息接口缓存,避免多次适配时会重复调取接口
  1. 仓库信息 https://git.zhonganinfo.com/zainfo/za-platform-adapter

开发分支:dev

  1. 项目框架 React + umi + antd

语言: Typescript(也可用js)

  1. 项目架构 此项目主要核心部分是数据的处理,在设计上每个组件都是一个对应的继承自 Adapter 的派生类

如果你的组件属性完全可以通过组件管理中的 attribute 决定,那就不需要做什么,否则请在 src/components 目录中建同名文件并默认导出

运行 npm run start 后会打开一个开发调试页面,输入对应的模块 code 和商品 id 可以用对应的数据进行开发测试

3.1 Adapter 类成员

async init(): thisType // 适配实例化后会立即执行的一段初始化方法
get attrs(): {} // attrs 属性
getConfigAttrs(): {} // 返回组件的完整属性
getParentNode() // 返回父节点信息
getChildren(Node) // 查找子节点
loadChild(Component: Adapter, template: {}, params: any[]) // 实例化一个节点对象 params会传递到 Adapter 中的 init 方法里解构成入参
 
public plan: Goods.PlanList // 如果模块勾选了计划层级,可以通过这个属性获取到商品的当前计划信息
public goods: Goods // 去商品详情
public template // 当前组件的模板信息
public module: Module // 获取当前模块的节点
  1. 项目发布 1、npm run build 发包的方式发布,不走 ship 2、npm publish

  2. 分支管理

保险基线 dev 分支 鲸小宝 jxb 分支 华润项目使用分支 dev_hr 分支

模版工具配置模块数据

{
    "id": 1955,
    "code": "LAY_001955",
    "type": "1-1",
    "component": "paymentPlanModule",
    "name": "通用试算信息收集",
    "style": null,
    "css": null,
    "relationKey": null,
    "attribute": {
        "showTitle": true,
        "showPlan": true,
        "relationKey": "", // 可以指定关联的 投保人、被保人、受益人、代理人模块要素  
    },
    "relations": [ // 模块包含的子组件
        {
            "id": 3292,
            "componentModuleCode": "COM_002161",
            "componentModuleName": "通用投保要素",
            "relationKey": "common.insuranceStartDate",
            "componentOrder": "0",
            "attribute": {
                "label": "起保日期"
            }
        },
    ],
    "gmtCreated": "2020-08-07T16:21:17.000+0800",
    "gmtModified": "2020-11-26T13:43:46.000+0800",
    "isDeleted": "N"
}