3.1.5 • Published 2 years ago

ks-customer-perception v3.1.5

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

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改造客户认知 增加电梯导航的功能

3.1.5

2 years ago

3.1.4

2 years ago

3.1.3

2 years ago

3.1.2

2 years ago

3.1.1

2 years ago

3.1.0

2 years ago

3.0.3

2 years ago

3.0.2

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.0

2 years ago