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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@beisen-cmps/platform-user-selector

v0.0.93-rc.17

Published

平台选人组件,绑定平台元数据

Downloads

111

Readme

组件使用、扩展文档

提交

  1. 修改package.json中的devDependencies里依赖版本, @beisen/gulp-lib -> 0.1.1; @beisen/storybook-lib -> 0.3.0
  2. npm install
  3. 修改代码后执行 npm run lib进行编译
  4. 更新package.json中的 version版本号
  5. push代码
  6. 在cmp.beisen.io站点,头部导航的《服务》中查看编译是否通过

人员组件 接口自定义配置

{
    //获取常用联系人接口
	"getUserUrl" : {
        "url": ""
        ,"method": "GET"
    },
    //获取下属接口
    "getStaffUrl" : {
        "url": ""
        ,"method": "GET"
    },
    //获取部门详细信息
    "getDeptUrl" : {
        "url": ""
        ,"method": "GET"
    },
    //获取部门下人员列表
    "getDeptUserUrl" : {
        "url": ""
        ,"method": "GET"
    },
    //搜索人员接口
    "getSearchUserUrl" : {
        "url": ""
        ,"method": "GET"
    }
    
}

可以配置部分参数,如果参数为空则请求系统默认接口

   const config = {
        titaHost: getBSGlobal('apiPath'),
        tenantId: getBSGlobal('tenantInfo').Id,
        userId: getBSGlobal('loginUserInfo').Id,
        application: getBSGlobal('application'),
        cloudHost: getBSGlobal('cloudHost') || '',// || '//cloud.italent.link',
    }

表单组件请求url添加 formState参数

使用参数

{
    text: this.props.text || '',
    value: this.props.value || '',
    "avatars":{
        "222":{ //头像,key要和value里对应
            "hasAvatar":false,
            "color":"#f0c75a"
        }
    },
    "cmp_id": "c569ca1e-e58b-4a54-8a82-274ebc654162",
    "cmp_name": "Onwer",
    "cmp_type": "BC_UserSelect",
    "cmp_label": "所有者",
    "cmp_data": {
        "AllowSearchNull": "1",
        "title": "所有者",
        "field_name": "BeisenCloudDemo.searchshengji.Onwer",
        "metaObjectName":"BeisenCloudDemo.searchshengji",
        "required": false,
        "cmp_state": "create",
        "cmp_status": "editable",
        "editdisplaystate": "editable",
        "createdisplaystate": "editable",
        "showdisplaystate": "readonly",
        "datasourcename": "BCStaffDataSource",
        "IsShowHeadPic": true,
        "dataType": "Text",
        "singleSelect": false,   //单选or多选
        "datasourceurl":{
            //获取常用联系人接口
            "getUserUrl" : {
                "url": ""
                ,"method": "GET"
            },
            //获取下属接口
            "getStaffUrl" : {
                "url": ""
                ,"method": "GET"
            },
            //获取部门详细信息
            "getDeptUrl" : {
                "url": ""
                ,"method": "GET"
            },
            //获取部门下人员列表
            "getDeptUserUrl" : {
                "url": ""
                ,"method": "GET"
            },
            //搜索人员接口
            "getSearchUserUrl" : {
                "url": ""
                ,"method": "GET"
            }
            
        }
    },
    "search_data": {
        metaFieldRelationIDPath: null,
        metaobjectname: "BeisenCloudDemo.searchshengji",
        opeartor: "eq",
        seperator: "-"
    },
    "biz_data": { "text": "" },
    "validators": {},
    "singleSelect": false   //单选or多选
    "usersDataFromProps": true //  true or false,审批参数
    styleTitle: 'rightFlush',        // "upAndDown" , "rightFlush",  "leftFlush", label的位置上下还是左右
    onChange: (value) => {}  //回调事件
}

组件使用

  1. npm install @beisen-cmps/platform-user-selector
  2. 该组件有两种使用方式, 第一种会走组件内部的获取数据方式,数据会存在state里,第二种会走外部传入的action
  3. import XXX from '@beisen-cmps/platform-user-selector'
  4. import {UserSelector} from '@beisen-cmps/platform-user-selector'
render() {
  return <UserSelector {...this.props}/>;
}