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

ks-customer-perception

v3.1.5

Published

[toc] ## 客户认知

Downloads

2

Readme

[toc]

客户认知

组件使用

// 安装包 使用yarn安装包
yarn add ks-customer-perception

// 导入依赖
import ksCustomerPerception from  'ks-customer-perception'


components: {
  ksCustomerPerception
},

// 使用组件   组件新增和编辑的时候,使用了formily
<ksCustomerPerception
  :appId="appId"
  :tenantId="tenantId"
  :entityTag="entityTag"
  :customerName="customerName"
  :customerType="customerType"
>

</ksCustomerPerception>

// 参数
:appId="appId" // 应用id
:tenantId="tenantId" // 租户id
:entityTag="entityTag" // 查询分组需要
:customerName="customerName" // 
:customerType="customerType"

接口整理

  • 接口
// xiaogang
获取分组信息:/biz/component/page/form/group,入参:entityTag
获取分组下的实体信息:/biz/component/page/form/schema,入参:formId

// xiaoliang
获取form的值:/biz/component/page/form/vodo/formData/query,入参:
// newParams
'appId': this.appId,
'bizTag': this.customerType,
'blist': form.blist,
'formId': group.formId,
'state': '1', // 写死
'tenantId': this.tenantId,
'viewSchemaCode': form.viewSchemaCode

提交表单的值:/biz/component/page/form/vodo/formData/save,入参:
// newParams
'appId': this.appId, // 业务身份appId,不是env中的appId
'bizTag': this.customerType,
'blist': v.blist, // 是否是table的标识
'formId': this.formId, // formId
'state': '1', // 写死
'tenantId': this.tenantId,
'viewSchemaCode': v.viewSchemaCode,
'viewSchemaName': v.viewSchemaName, // 在返回错误信息的时候,告诉用户哪个保存失败的
  
'voCode': v.voCode||null, // 新增还是编辑,类似主键id
fields: JSON.stringify(v.formRef.values), // 表单的值
  • 依赖table组件,还需要看下table组件的参数:
获取Th:/entity/table/getSchema,入参:
'tenantId': this.tenantId,
'appId': this.appId,
'entityTypeName': this.entityCode,// 实体code,后端确定的key
sdkBizTag:this.customerType, // 新增字段,通过URL获取
  
获取table数据:/entity/table/search,入参:
// 头两个需要确认
'tenantId': this.tenantId,
'appId': this.appId,
'entityName': this.entityCode,// 实体code,后端确定的key
// 修改了入参格式:
// bizKey:this.customerName + '|' + this.customerType,
searchKey:'bizKey',
searchValue:this.customerName + '|' + this.customerType,
'pageNum': this.tableSettings.page || 1,
'pageSize': this.tableSettings.size || 10

新增或者编辑:/entity/table/save,入参:
'tenantId': this.tenantId,
'appId': this.appId,
'entityName': this.entityCode, // 实体code
'entityContent': JSON.stringify(this.form.values)
'id':item.id||null, // 主键id
  
删除:/entity/table/delete/${params.id},入参:主键id
  • table的问题: 1.新增和编辑的时候,schema需要确认一下处理逻辑是否ok,与其他的保持一致 2.formatDate过滤器,需要增加一下

version

  • 1.0.0: 空项目

  • 2.x.x: 完成查看页面的完整功能

  • 3.0.x: 编辑功能

  • 3.1.x: 根据DO/VO改造客户认知 增加电梯导航的功能