ai-search-atlas
TypeScript icon, indicating that this package has built-in type declarations

1.0.19 • Public • Published

title: atals order: 1

本 Demo 演示一行文字的用法。

import React, { Component } from "react";
import ReactDOM from "react-dom";
import { Button, Modal } from "antd";
import { Atlas } from "ai-search-atlas";

class App extends Component {
  render() {
    return (
      <div style={{ width: 1000 }}>
        <Atlas
          moduleCode="12345"
          apiDataUrl="/module/powersearch/api/module/data/relation/get"
          apiConfUrl="/module/ps-module-data-config/getInputOutPutParam"
          queryParams={{
            caseId: "12222222",
            searchKey: "sss",
          }}
          datas={{
            mainNode: {
              idType: "sfzh", //主节点类型
              idValue: "330199408121234", //主题唯一键key
              idName: "张五", //节点显示名称
              iconPath:
                "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=3653621825,3760507210&fm=15&gp=0.jpg", //节点显示图标,人节点提供证件照url路径,其他的可以指定图片路径
            },
            relations: [
              {
                relationNode: {
                  idType: "sfzh",
                  idValue: "330199508121234",
                  idName: "李三",
                  iconPath:
                    "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=3653621825,3760507210&fm=15&gp=0.jpg",
                },
                relationList: [
                  {
                    relationName: "同车厢关系",
                    relationVaule: "同车厢3次",
                    score: 0.5,
                  },
                  {
                    relationName: "同飞机关系",
                    relationVaule: "同飞机3次",
                    score: 0.5,
                  },
                ],
              },
              {
                relationNode: {
                  idType: "sfzh",
                  idValue: "330199808121234",
                  idName: "李四",
                  iconPath:
                    "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=3653621825,3760507210&fm=15&gp=0.jpg",
                },
                relationList: [
                  {
                    relationName: "同车厢关系",
                    relationVaule: "同车厢4次",
                    score: 0.5,
                  },
                  {
                    relationName: "同飞机关系",
                    relationVaule: "同飞机4次",
                    score: 0.5,
                  },
                ],
              },
            ],
            keyPersonList: ["330199808121234"], //重点人员列表
          }}
        />
      </div>
    );
  }
}

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

props

参数 类型 说明 必填
apiDataUrl string 数据接口 否(datas有值必填)
apiConfUrl object 获取数据入参接口 否(datas有值必填)
queryParams object 获取数据入参,映射字段 否(datas有值必填)
moduleCode string 模块唯一 code 否(datas有值必填)
datas object 渲染数据

Package Sidebar

Install

npm i ai-search-atlas

Weekly Downloads

20

Version

1.0.19

License

MIT

Unpacked Size

112 kB

Total Files

50

Last publish

Collaborators

  • yuanff