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

ai-search-basicinfo

v1.0.12

Published

基本信息(图片详情右侧)

Downloads

6

Readme

DemoTable

import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { BasicInfo } from 'ai-search-basicinfo';
import { data, fields } from './dataSource';

class App extends Component {
  render() {
    const labelConfig = {
      lableUrl: "POST /module/label/ps-label/getLabel",
      tabConfigUrl: "/module/ps-module-data-config/getInputOutPutParam",
      tableDataUrl: "POST /module/powersearch/api/module/data/get",
    }
    return (
      <div>
        <BasicInfo label={labelConfig} hlList={data.highlight} data={data} fields={fields}/>
        <BasicInfo label={labelConfig} hlList={data.highlight} confUrl={'/mock/akDCghOZ1/basicinfo'} queryBody={{id: 1}} fields={fields} />
      </div>
    );
  }
}

ReactDOM.render((
  <App />
), mountNode);

props

| 参数 | 类型 | 说明 | 必填 | | :----------- | :--------------: | -----------: | ---- | | data | object | 传入的数据 | 否 | | fields | object |传入的展示数据对应的字段 | 否 | | confUrl | string | 请求数据的url | 否 | | queryBody | object | 请求数据的传参 | 否 | | hlList | object | 高亮数据 | 否 | | label | object | 标签组件配置项 | 否 |

data示例

  {
    "recordType": "preson",
    "picUrl": "https://img.alicdn.com/tfs/TB1NmDCaCzqK1RjSZPcXXbTepXa-690-965.png",
    "highlight":[
            "362330199112138274"
        ],
    "title":{
            "age":"29",
            "hyzk":"未婚",
            "mz":"汉族",
            "xb":"男性",
            "xm":"李刚",
            "zjhm":"362330199112138274"
    },
    "baseInfo":{
          "hjd":"游城乡高坊村163号",
          "jg":"江西省波阳县",
          "jzd":"",
          "lxfs":"15970302955,18270320870",
          "whcd":"小学教育"
    },
    "labels": [
                {
                  "labelName": "与吸毒人员出行次数",               //标签名称
                  "labelType": 2,                                //标签类型 1布尔类型,2统计类型 3占比类型 4直接展示类型
                  "expression": "与吸毒人员出行value次",          //表达式
                  "labelValue": "1",                            //标签值
                  "displayValue": "与吸毒人员出行1次",            //
                  "orderNum": 2,
                  "labelDesc": "出行记录",
                  "remarks": null,
                  "zjhm": "1243",
                  "cphm": null,
                  "lgdm": null,
                  "labelCategoryId": 1,
                  "categoryCode": "ryjbxx",
                  "categoryName": "人员基本信息",
                  "parentCategoryId": "0",
                  "moduleCode": "xdry"
                },
                {
                  "labelName": "凌晨上网占比",
                  "labelType": 3,
                  "expression": "凌晨上网占比value",
                  "labelValue": "0.6",
                  "displayValue": "凌晨上网占比60%",
                  "orderNum": 1,
                  "labelDesc": "上网记录",
                  "remarks": null,
                  "zjhm": "1243",
                  "cphm": null,
                  "lgdm": null,
                  "labelCategoryId": 1,
                  "categoryCode": "ryjbxx",
                  "categoryName": "人员基本信息",
                  "parentCategoryId": "0",
                  "moduleCode": "swzb"
                },
                {
                  "labelName": "凌晨上网占比",
                  "labelType": 3,
                  "expression": "凌晨上网占比value",
                  "labelValue": "0.6",
                  "displayValue": "凌晨上网占比70%",
                  "orderNum": 1,
                  "labelDesc": "上网记录",
                  "remarks": null,
                  "zjhm": "1243",
                  "cphm": null,
                  "lgdm": null,
                  "labelCategoryId": 1,
                  "categoryCode": "ryjbxx",
                  "categoryName": "人员基本信息",
                  "parentCategoryId": "0",
                  "moduleCode": "swzb1"
                },
                {
                  "labelName": "与吸毒人员出行次数",               //标签名称
                  "labelType": 2,                                //标签类型 1布尔类型,2统计类型 3占比类型 4直接展示类型
                  "expression": "与吸毒人员出行value次",          //表达式
                  "labelValue": "1",                            //标签值
                  "displayValue": "与吸毒人员出行1次",            //
                  "orderNum": 2,
                  "labelDesc": "出行记录",
                  "remarks": null,
                  "zjhm": "1243",
                  "cphm": null,
                  "lgdm": null,
                  "labelCategoryId": 1,
                  "categoryCode": "ryjbxx",
                  "categoryName": "人员基本信息",
                  "parentCategoryId": "0",
                  "moduleCode": "xdry"
                },
                {
                  "labelName": "凌晨上网占比",
                  "labelType": 3,
                  "expression": "凌晨上网占比value",
                  "labelValue": "0.6",
                  "displayValue": "凌晨上网占比60%",
                  "orderNum": 1,
                  "labelDesc": "上网记录",
                  "remarks": null,
                  "zjhm": "1243",
                  "cphm": null,
                  "lgdm": null,
                  "labelCategoryId": 1,
                  "categoryCode": "ryjbxx",
                  "categoryName": "人员基本信息",
                  "parentCategoryId": "0",
                  "moduleCode": "swzb"
                },
                {
                  "labelName": "凌晨上网占比",
                  "labelType": 3,
                  "expression": "凌晨上网占比value",
                  "labelValue": "0.6",
                  "displayValue": "凌晨上网占比70%",
                  "orderNum": 1,
                  "labelDesc": "上网记录",
                  "remarks": null,
                  "zjhm": "1243",
                  "cphm": null,
                  "lgdm": null,
                  "labelCategoryId": 1,
                  "categoryCode": "ryjbxx",
                  "categoryName": "人员基本信息",
                  "parentCategoryId": "0",
                  "moduleCode": "swzb1"
                },
    ]
  }

config示例

  {
    queryParams: {
      subjectCode: 'recordType',
      idValueCode: 'identifier',
    },
    imgCode: 'picUrl',
    hlText: '',
    title: {
      titleCode: 'title',
      nameCode: {
        type: 'link',
        value: 'xm',
        onClick: (data) => {
          console.log(data);
        }
      },
      cardCode: {
        type: 'link',
        value: 'zjhm',
        onClick: (data) => {
          console.log(data);
        }
      },
      codeList: [
        {
          type: 'text',
          value: 'xb',
        },
        {
          type: 'text',
          value: 'age',
        },
        {
          type: 'text',
          value: 'mz',
        },
        {
          type: 'text',
          value: 'hyzk'
        }
      ]
    },
    basic: [
      {
      basicCode: 'baseInfo',
      basicTxet: '基本信息',
      codeList: [
        {
          type: 'text',
          value: 'lxfs',
          label: '手机号',
          fmt: (value) => {
            return value && value.split(',')
          }
        },
        {
          type: 'text',
          value: 'jg',
          label: '籍贯'
        },
        {
          type: 'text',
          value: 'whcd',
          label: '文化程度'
        },
        {
          type: 'text',
          value: 'jzd',
          label: '居住地址'
        },
        {
          type: 'text',
          value: 'hjd',
          label: '户籍地址'
        },
      ],
    },
    {
      basicCode: 'baseInfo',
      basicTxet: '基本信息2',
      codeList: [
        {
          type: 'link',
          value: 'lxfs',
          label: '手机号',
          fmt: (value) => {
            return value && value.split(',')
          }
        },
        {
          type: 'text',
          value: 'jg',
          label: '籍贯'
        },
        {
          type: 'text',
          value: 'whcd',
          label: '文化程度'
        },
        {
          type: 'text',
          value: 'jzd',
          label: '居住地址'
        },
        {
          type: 'text',
          value: 'hjd',
          label: '户籍地址'
        },
      ],
    },
    ],
    result: {
      resultTxet: '结果命中',
    },
  }