neo-cmp-cli 1.13.15 → 1.13.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/index2.js +1 -1
- package/dist/main2.js +1 -1
- package/dist/neo/neoLogin.js +1 -1
- package/dist/package.json.js +1 -1
- package/docs//351/200/232/347/224/250/344/273/243/347/220/206/346/216/245/345/217/243/forward.zip +0 -0
- package/docs//351/200/232/347/224/250/344/273/243/347/220/206/346/216/245/345/217/243//350/207/252/345/256/232/344/271/211API:/351/200/232/347/224/250/344/273/243/347/220/206/346/216/245/345/217/243/344/275/277/347/224/250/350/257/264/346/230/216.md +13 -0
- package/package.json +1 -1
- package/template/antd-custom-cmp-template/package.json +1 -1
- package/template/asset-manage-template/package.json +2 -2
- package/template/echarts-custom-cmp-template/package.json +1 -1
- package/template/empty-custom-cmp-template/package.json +2 -2
- package/template/map-custom-cmp-template/package.json +1 -1
- package/template/neo-bi-cmps/neo.config.js +7 -1
- package/template/neo-bi-cmps/package.json +8 -7
- package/template/neo-bi-cmps/public/403.html +77 -0
- package/template/neo-bi-cmps/src/assets/icon/barChart.svg +1 -0
- package/template/neo-bi-cmps/src/assets/icon/card.svg +1 -0
- package/template/neo-bi-cmps/src/assets/icon/filter.svg +1 -0
- package/template/neo-bi-cmps/src/assets/icon/funnel.svg +1 -0
- package/template/neo-bi-cmps/src/assets/icon/tab.svg +1 -0
- package/template/neo-bi-cmps/src/components/filterBar__c/README.md +3 -14
- package/template/neo-bi-cmps/src/components/filterBar__c/common.scss +29 -0
- package/template/neo-bi-cmps/src/components/filterBar__c/index.tsx +668 -146
- package/template/neo-bi-cmps/src/components/filterBar__c/model.ts +26 -48
- package/template/neo-bi-cmps/src/components/filterBar__c/style.scss +46 -139
- package/template/neo-bi-cmps/src/components/targetNumber__c/customStyleConfig/index.tsx +11 -10
- package/template/neo-bi-cmps/src/components/targetNumber__c/index.tsx +9 -16
- package/template/neo-bi-cmps/src/utils/common.ts +231 -0
- package/template/neo-bi-cmps/src/utils/filter2chartFilter.ts +268 -0
- package/template/neo-bi-cmps/src/utils/filterBar.ts +140 -0
- package/template/neo-bi-cmps/src/utils/pipelineFunnel.ts +341 -0
- package/template/neo-bi-cmps/src/utils/queryByCustomSQL.ts +117 -0
- package/template/neo-bi-cmps/src/utils/requestDebounce.ts +22 -0
- package/template/neo-bi-cmps/src/utils/simpleTable.tsx +344 -0
- package/template/neo-bi-cmps/src/utils/stageSwitch.ts +15 -0
- package/template/neo-bi-cmps/src/utils/stageTimeChart.ts +90 -0
- package/template/neo-bi-cmps/src/utils/targetNumber.ts +12 -0
- package/template/neo-custom-cmp-template/package.json +2 -2
- package/template/neo-h5-cmps/package.json +2 -2
- package/template/neo-order-cmps/package.json +2 -2
- package/template/neo-pipeline-cmps/.prettierrc.js +12 -0
- package/template/neo-pipeline-cmps/@types/neo-ui-common.d.ts +36 -0
- package/template/neo-pipeline-cmps/README.md +99 -0
- package/template/neo-pipeline-cmps/commitlint.config.js +59 -0
- package/template/neo-pipeline-cmps/neo.config.js +124 -0
- package/template/neo-pipeline-cmps/package.json +66 -0
- package/template/neo-pipeline-cmps/public/403.html +77 -0
- package/template/neo-pipeline-cmps/public/css/base.css +283 -0
- package/template/neo-pipeline-cmps/public/demo.html +2453 -0
- package/template/neo-pipeline-cmps/public/scripts/app/bluebird.js +6679 -0
- package/template/neo-pipeline-cmps/public/template.html +13 -0
- package/template/neo-pipeline-cmps/src/assets/css/common.scss +127 -0
- package/template/neo-pipeline-cmps/src/assets/css/mixin.scss +47 -0
- package/template/neo-pipeline-cmps/src/assets/icon/barChart.svg +1 -0
- package/template/neo-pipeline-cmps/src/assets/icon/card.svg +1 -0
- package/template/neo-pipeline-cmps/src/assets/icon/filter.svg +1 -0
- package/template/neo-pipeline-cmps/src/assets/icon/funnel.svg +1 -0
- package/template/neo-pipeline-cmps/src/assets/icon/tab.svg +1 -0
- package/template/neo-pipeline-cmps/src/assets/img/AIBtn.gif +0 -0
- package/template/neo-pipeline-cmps/src/assets/img/NeoCRM.jpg +0 -0
- package/template/neo-pipeline-cmps/src/assets/img/aiLogo.png +0 -0
- package/template/neo-pipeline-cmps/src/assets/img/card-list.svg +1 -0
- package/template/neo-pipeline-cmps/src/assets/img/contact-form.svg +1 -0
- package/template/neo-pipeline-cmps/src/assets/img/custom-form.svg +1 -0
- package/template/neo-pipeline-cmps/src/assets/img/custom-widget.svg +1 -0
- package/template/neo-pipeline-cmps/src/assets/img/data-list.svg +1 -0
- package/template/neo-pipeline-cmps/src/assets/img/detail.svg +1 -0
- package/template/neo-pipeline-cmps/src/assets/img/favicon.png +0 -0
- package/template/neo-pipeline-cmps/src/assets/img/map.svg +1 -0
- package/template/neo-pipeline-cmps/src/assets/img/search.svg +1 -0
- package/template/neo-pipeline-cmps/src/assets/img/table.svg +1 -0
- package/template/neo-pipeline-cmps/src/components/filterBar__c/README.md +24 -0
- package/template/neo-pipeline-cmps/src/components/filterBar__c/common.scss +29 -0
- package/template/neo-pipeline-cmps/src/components/filterBar__c/index.tsx +730 -0
- package/template/neo-pipeline-cmps/src/components/filterBar__c/model.ts +50 -0
- package/template/neo-pipeline-cmps/src/components/filterBar__c/style.scss +119 -0
- package/template/neo-pipeline-cmps/src/components/pipelineFunnel__c/index.tsx +415 -0
- package/template/neo-pipeline-cmps/src/components/pipelineFunnel__c/model.ts +79 -0
- package/template/neo-pipeline-cmps/src/components/pipelineFunnel__c/style.scss +83 -0
- package/template/neo-pipeline-cmps/src/components/showHealthResult__c/index.tsx +463 -0
- package/template/neo-pipeline-cmps/src/components/showHealthResult__c/model.ts +45 -0
- package/template/neo-pipeline-cmps/src/components/showHealthResult__c/style.scss +137 -0
- package/template/neo-pipeline-cmps/src/components/simpleTable__c/README.md +90 -0
- package/template/neo-pipeline-cmps/src/components/simpleTable__c/common.scss +195 -0
- package/template/neo-pipeline-cmps/src/components/simpleTable__c/index.tsx +665 -0
- package/template/neo-pipeline-cmps/src/components/simpleTable__c/model.ts +124 -0
- package/template/neo-pipeline-cmps/src/components/simpleTable__c/style.scss +193 -0
- package/template/neo-pipeline-cmps/src/components/stageSwitch__c/index.tsx +511 -0
- package/template/neo-pipeline-cmps/src/components/stageSwitch__c/model.ts +70 -0
- package/template/{neo-bi-cmps → neo-pipeline-cmps}/src/components/stageSwitch__c/style.scss +4 -2
- package/template/neo-pipeline-cmps/src/components/stageTimeChart__c/index.tsx +455 -0
- package/template/neo-pipeline-cmps/src/components/stageTimeChart__c/model.ts +103 -0
- package/template/{neo-bi-cmps → neo-pipeline-cmps}/src/components/stageTimeChart__c/style.scss +3 -2
- package/template/neo-pipeline-cmps/src/utils/common.ts +229 -0
- package/template/neo-pipeline-cmps/src/utils/filter2chartFilter.ts +268 -0
- package/template/neo-pipeline-cmps/src/utils/filterBar.ts +140 -0
- package/template/neo-pipeline-cmps/src/utils/pipelineFunnel.ts +343 -0
- package/template/neo-pipeline-cmps/src/utils/queryByCustomSQL.ts +117 -0
- package/template/neo-pipeline-cmps/src/utils/requestDebounce.ts +22 -0
- package/template/neo-pipeline-cmps/src/utils/simpleTable.tsx +344 -0
- package/template/neo-pipeline-cmps/src/utils/stageSwitch.ts +15 -0
- package/template/neo-pipeline-cmps/src/utils/stageTimeChart.ts +90 -0
- package/template/neo-pipeline-cmps/src/utils/targetNumber.ts +12 -0
- package/template/neo-pipeline-cmps/tsconfig.json +40 -0
- package/template/neo-web-entity-grid/package.json +2 -2
- package/template/neo-web-form/package.json +2 -2
- package/template/react-custom-cmp-template/package.json +1 -1
- package/template/react-ts-custom-cmp-template/package.json +1 -1
- package/template/vue2-custom-cmp-template/package.json +1 -1
- package/template/neo-bi-cmps/.npmrc copy +0 -1
- package/template/neo-bi-cmps/docs/gartner-pipeline-apis.md +0 -251
- package/template/neo-bi-cmps/docs/gartner-pipeline-prd.md +0 -389
- package/template/neo-bi-cmps/docs/neo-backend-dev/SKILL.md +0 -188
- package/template/neo-bi-cmps/docs/neo-backend-dev/references/01-Trigger/345/274/200/345/217/221.md +0 -183
- package/template/neo-bi-cmps/docs/neo-backend-dev/references/02-/350/207/252/345/256/232/344/271/211API/345/274/200/345/217/221.md +0 -196
- package/template/neo-bi-cmps/docs/neo-backend-dev/references/03-SDK/345/267/245/345/205/267/347/261/273/346/216/245/345/217/243.md +0 -346
- package/template/neo-bi-cmps/docs/neo-backend-dev/references/04-/350/256/241/345/210/222/344/275/234/344/270/232/345/274/200/345/217/221.md +0 -188
- package/template/neo-bi-cmps/docs/neo-backend-dev/references/05-/351/241/265/351/235/242/345/274/200/345/217/221.md +0 -293
- package/template/neo-bi-cmps/docs/neo-backend-dev/references/06-/346/265/201/347/250/213/346/211/251/345/261/225/345/274/200/345/217/221.md +0 -175
- package/template/neo-bi-cmps/docs/neo-backend-dev/references/PaaS/345/271/263/345/217/260/345/274/200/345/217/221/346/211/213/345/206/214/350/247/243/350/257/273.md +0 -313
- package/template/neo-bi-cmps/docs/neo-backend-dev/references/auth-config.md +0 -77
- package/template/neo-bi-cmps/docs/neo-backend-dev/scripts/deploy_server_script.py +0 -118
- package/template/neo-bi-cmps/docs/neo-backend-dev/scripts/download_server_script.py +0 -74
- package/template/neo-bi-cmps/docs/neo-backend-dev/scripts/gen_entity_desc.py +0 -69
- package/template/neo-bi-cmps/docs/neo-backend-dev/scripts/gen_entitylist.py +0 -87
- package/template/neo-bi-cmps/docs/neo-backend-dev/scripts/query_crm.py +0 -65
- package/template/neo-bi-cmps/docs/neo-backend-dev/scripts/uninstall_server_script.py +0 -48
- package/template/neo-bi-cmps/docs/neo-backend-dev/scripts/update_model_jar.py +0 -49
- package/template/neo-bi-cmps/docs/neo-frontend-dev/SKILL.md +0 -138
- package/template/neo-bi-cmps/docs/neo-frontend-dev/references/auth-config.md +0 -77
- package/template/neo-bi-cmps/docs/neo-frontend-dev/references/component-dev.md +0 -205
- package/template/neo-bi-cmps/docs/neo-frontend-dev/references/entityTable-example.md +0 -167
- package/template/neo-bi-cmps/docs/neo-frontend-dev/references/templates.md +0 -38
- package/template/neo-bi-cmps/docs/neo-frontend-dev/scripts/gen_entity_desc.py +0 -69
- package/template/neo-bi-cmps/docs/neo-frontend-dev/scripts/gen_entitylist.py +0 -87
- package/template/neo-bi-cmps/docs/neo-frontend-dev/scripts/query_crm.py +0 -65
- package/template/neo-bi-cmps/docs//350/264/246/345/217/267/347/233/270/345/205/263/344/277/241/346/201/257.md +0 -10
- package/template/neo-bi-cmps/src/components/aiCommitDrawer__c/README.md +0 -52
- package/template/neo-bi-cmps/src/components/aiCommitDrawer__c/index.tsx +0 -183
- package/template/neo-bi-cmps/src/components/aiCommitDrawer__c/model.ts +0 -90
- package/template/neo-bi-cmps/src/components/aiCommitDrawer__c/style.scss +0 -218
- package/template/neo-bi-cmps/src/components/forecastChart__c/README.md +0 -31
- package/template/neo-bi-cmps/src/components/forecastChart__c/index.tsx +0 -158
- package/template/neo-bi-cmps/src/components/forecastChart__c/model.ts +0 -40
- package/template/neo-bi-cmps/src/components/forecastChart__c/style.scss +0 -154
- package/template/neo-bi-cmps/src/components/forecastGrid__c/README.md +0 -36
- package/template/neo-bi-cmps/src/components/forecastGrid__c/index.tsx +0 -86
- package/template/neo-bi-cmps/src/components/forecastGrid__c/model.ts +0 -62
- package/template/neo-bi-cmps/src/components/forecastGrid__c/style.scss +0 -48
- package/template/neo-bi-cmps/src/components/gapCloser__c/README.md +0 -24
- package/template/neo-bi-cmps/src/components/gapCloser__c/index.tsx +0 -100
- package/template/neo-bi-cmps/src/components/gapCloser__c/model.ts +0 -46
- package/template/neo-bi-cmps/src/components/gapCloser__c/style.scss +0 -60
- package/template/neo-bi-cmps/src/components/kpiCards__c/README.md +0 -35
- package/template/neo-bi-cmps/src/components/kpiCards__c/index.tsx +0 -70
- package/template/neo-bi-cmps/src/components/kpiCards__c/model.ts +0 -50
- package/template/neo-bi-cmps/src/components/kpiCards__c/style.scss +0 -33
- package/template/neo-bi-cmps/src/components/oppList__c/README.md +0 -52
- package/template/neo-bi-cmps/src/components/oppList__c/index.tsx +0 -285
- package/template/neo-bi-cmps/src/components/oppList__c/model.ts +0 -86
- package/template/neo-bi-cmps/src/components/oppList__c/style.scss +0 -133
- package/template/neo-bi-cmps/src/components/pipelineFunnel__c/index.tsx +0 -130
- package/template/neo-bi-cmps/src/components/pipelineFunnel__c/model.ts +0 -66
- package/template/neo-bi-cmps/src/components/pipelineFunnel__c/style.scss +0 -133
- package/template/neo-bi-cmps/src/components/stageSwitch__c/index.tsx +0 -118
- package/template/neo-bi-cmps/src/components/stageSwitch__c/model.ts +0 -92
- package/template/neo-bi-cmps/src/components/stageTimeChart__c/index.tsx +0 -126
- package/template/neo-bi-cmps/src/components/stageTimeChart__c/model.ts +0 -57
- package/template/neo-bi-cmps/src/components/tabSwitch__c/README.md +0 -37
- package/template/neo-bi-cmps/src/components/tabSwitch__c/index.tsx +0 -80
- package/template/neo-bi-cmps/src/components/tabSwitch__c/model.ts +0 -45
- package/template/neo-bi-cmps/src/components/tabSwitch__c/style.scss +0 -37
- package/template/neo-bi-cmps/src/utils/axiosFetcher.ts +0 -37
- package/template/neo-bi-cmps/src/utils/queryObjectData.ts +0 -76
- package/template/neo-bi-cmps/src/utils/xobjects.ts +0 -162
- /package/template/neo-bi-cmps/{docs/prototype-pipeline-forecasting.html → public/demo.html} +0 -0
- /package/template/{neo-bi-cmps → neo-pipeline-cmps}/src/components/pipelineFunnel__c/README.md +0 -0
- /package/template/{neo-bi-cmps → neo-pipeline-cmps}/src/components/stageSwitch__c/README.md +0 -0
- /package/template/{neo-bi-cmps → neo-pipeline-cmps}/src/components/stageTimeChart__c/README.md +0 -0
|
@@ -1,293 +0,0 @@
|
|
|
1
|
-
# 技能包:页面开发
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
销售易 PaaS 平台支持将自定义开发的 HTML/JS/CSS 页面集成到 CRM 系统中,实现个性化的页面定制。
|
|
6
|
-
|
|
7
|
-
## 页面类型
|
|
8
|
-
|
|
9
|
-
| 类型 | 说明 |
|
|
10
|
-
|------|------|
|
|
11
|
-
| 第三方应用页面 | 集成已有的外部系统页面 |
|
|
12
|
-
| 自定义开发页面 | 使用 HTML/JS/CSS 开发的自定义页面 |
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
## 1. 自定义页面开发
|
|
17
|
-
|
|
18
|
-
### 页面入口地址格式
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
https://lapp-{环境}.xiaoshouyi.com/service/lapp/page/{页面代码 API 名称}
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
### 基础页面模板
|
|
25
|
-
|
|
26
|
-
```html
|
|
27
|
-
<!DOCTYPE html>
|
|
28
|
-
<html lang="zh-CN">
|
|
29
|
-
<head>
|
|
30
|
-
<meta charset="UTF-8">
|
|
31
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
32
|
-
<title>自定义页面</title>
|
|
33
|
-
<!-- 引入 NeoLappSdk.js(推荐线上资源) -->
|
|
34
|
-
<script type="text/javascript" src="/js/jssdk/neoLapp.js"></script>
|
|
35
|
-
<style>
|
|
36
|
-
body { font-family: Arial, sans-serif; padding: 20px; }
|
|
37
|
-
.container { max-width: 800px; margin: 0 auto; }
|
|
38
|
-
.btn { padding: 8px 16px; background: #1890ff; color: #fff; border: none; border-radius: 4px; cursor: pointer; }
|
|
39
|
-
.btn:hover { background: #40a9ff; }
|
|
40
|
-
table { width: 100%; border-collapse: collapse; margin-top: 16px; }
|
|
41
|
-
th, td { border: 1px solid #ddd; padding: 8px; text-align: left; }
|
|
42
|
-
th { background: #f5f5f5; }
|
|
43
|
-
</style>
|
|
44
|
-
</head>
|
|
45
|
-
<body>
|
|
46
|
-
<div class="container">
|
|
47
|
-
<h2>自定义页面示例</h2>
|
|
48
|
-
<div>
|
|
49
|
-
<input type="text" id="keyword" placeholder="请输入搜索关键词">
|
|
50
|
-
<button class="btn" onclick="searchData()">搜索</button>
|
|
51
|
-
</div>
|
|
52
|
-
<table id="dataTable">
|
|
53
|
-
<thead>
|
|
54
|
-
<tr><th>ID</th><th>名称</th><th>操作</th></tr>
|
|
55
|
-
</thead>
|
|
56
|
-
<tbody id="tableBody"></tbody>
|
|
57
|
-
</table>
|
|
58
|
-
</div>
|
|
59
|
-
|
|
60
|
-
<script>
|
|
61
|
-
// 查询数据
|
|
62
|
-
function searchData() {
|
|
63
|
-
var keyword = document.getElementById('keyword').value;
|
|
64
|
-
lapp.connection.invoke({
|
|
65
|
-
url: '/data/v1/query',
|
|
66
|
-
method: 'post',
|
|
67
|
-
contentType: 'application/x-www-form-urlencoded',
|
|
68
|
-
data: {
|
|
69
|
-
"q": "SELECT id, name FROM account WHERE name LIKE '%" + keyword + "%' LIMIT 20"
|
|
70
|
-
}
|
|
71
|
-
}).then(
|
|
72
|
-
function(res) {
|
|
73
|
-
console.log('查询结果:', res);
|
|
74
|
-
renderTable(res.records || []);
|
|
75
|
-
},
|
|
76
|
-
function(err) {
|
|
77
|
-
console.error('查询失败:', err);
|
|
78
|
-
alert('查询失败: ' + JSON.stringify(err));
|
|
79
|
-
}
|
|
80
|
-
);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
// 渲染表格
|
|
84
|
-
function renderTable(records) {
|
|
85
|
-
var tbody = document.getElementById('tableBody');
|
|
86
|
-
tbody.innerHTML = '';
|
|
87
|
-
records.forEach(function(record) {
|
|
88
|
-
var tr = document.createElement('tr');
|
|
89
|
-
tr.innerHTML = '<td>' + record.id + '</td>'
|
|
90
|
-
+ '<td>' + (record.name || '') + '</td>'
|
|
91
|
-
+ '<td><button class="btn" onclick="viewDetail(' + record.id + ')">查看</button></td>';
|
|
92
|
-
tbody.appendChild(tr);
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
// 查看详情(使用 JS SDK 2.0)
|
|
97
|
-
function viewDetail(recordId) {
|
|
98
|
-
ctx.api.openDetailPage({
|
|
99
|
-
objectApiKey: 'account',
|
|
100
|
-
recordId: recordId
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
</script>
|
|
104
|
-
</body>
|
|
105
|
-
</html>
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
---
|
|
109
|
-
|
|
110
|
-
## 2. JS SDK 2.0 API
|
|
111
|
-
|
|
112
|
-
### 打开新建表单页
|
|
113
|
-
|
|
114
|
-
```javascript
|
|
115
|
-
ctx.api.openCreateForm({
|
|
116
|
-
objectApiKey: 'vehicle__c',
|
|
117
|
-
businessType: 'defaultBusiType',
|
|
118
|
-
config: {
|
|
119
|
-
values: {
|
|
120
|
-
color__c: "红",
|
|
121
|
-
productionYear__c: "2024"
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
})
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
**回调参数:**
|
|
128
|
-
- `action`: cancel(取消)、save(保存)、submitForApproval(提交审批)
|
|
129
|
-
- `record`: 返回数据 ID(仅保存后返回)
|
|
130
|
-
|
|
131
|
-
### 打开编辑表单页
|
|
132
|
-
|
|
133
|
-
```javascript
|
|
134
|
-
ctx.api.openEditForm({
|
|
135
|
-
objectApiKey: 'vehicle__c',
|
|
136
|
-
recordId: 3612682071966311,
|
|
137
|
-
config: {
|
|
138
|
-
values: {
|
|
139
|
-
color__c: "蓝"
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
})
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
### 打开复制表单页
|
|
146
|
-
|
|
147
|
-
```javascript
|
|
148
|
-
ctx.api.openCopyForm({
|
|
149
|
-
objectApiKey: 'vehicle__c',
|
|
150
|
-
businessType: 'defaultBusiType',
|
|
151
|
-
recordId: 3612682071966311,
|
|
152
|
-
config: {
|
|
153
|
-
values: {
|
|
154
|
-
color__c: "灰"
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
})
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
### 打开列表页
|
|
161
|
-
|
|
162
|
-
```javascript
|
|
163
|
-
// 常规列表页
|
|
164
|
-
ctx.api.openListPage({
|
|
165
|
-
objectApiKey: 'vehicle__c',
|
|
166
|
-
listView: 'defualtView',
|
|
167
|
-
config: {
|
|
168
|
-
isNewTab: false
|
|
169
|
-
}
|
|
170
|
-
})
|
|
171
|
-
|
|
172
|
-
// 相关列表页(移动端)
|
|
173
|
-
ctx.api.openListPage({
|
|
174
|
-
objectApiKey: 'vehicle__c',
|
|
175
|
-
referItemApiKey: "dealer__c",
|
|
176
|
-
masterRecordId: 3612664075158103
|
|
177
|
-
})
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
### 打开详情页
|
|
181
|
-
|
|
182
|
-
```javascript
|
|
183
|
-
ctx.api.openDetailPage({
|
|
184
|
-
objectApiKey: 'vehicle__c',
|
|
185
|
-
recordId: 3612682071966311
|
|
186
|
-
})
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
### 页面操作
|
|
190
|
-
|
|
191
|
-
```javascript
|
|
192
|
-
// 刷新当前页面
|
|
193
|
-
ctx.ui.refreshPage()
|
|
194
|
-
|
|
195
|
-
// 关闭当前弹窗
|
|
196
|
-
ctx.ui.closeIframe()
|
|
197
|
-
|
|
198
|
-
// 回退页面(移动端)
|
|
199
|
-
ctx.ui.goBack()
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
---
|
|
203
|
-
|
|
204
|
-
## 3. 页面代码请求示例(NeoLappSdk.js)
|
|
205
|
-
|
|
206
|
-
### GET 请求
|
|
207
|
-
|
|
208
|
-
```javascript
|
|
209
|
-
lapp.connection.invoke({
|
|
210
|
-
url: '/data/v1/objects/user/accessUser',
|
|
211
|
-
method: 'get'
|
|
212
|
-
}).then(
|
|
213
|
-
res => { console.log(res); },
|
|
214
|
-
err => { console.log(err); }
|
|
215
|
-
)
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
### POST JSON 请求
|
|
219
|
-
|
|
220
|
-
```javascript
|
|
221
|
-
lapp.connection.invoke({
|
|
222
|
-
url: '/data/v1/query',
|
|
223
|
-
method: 'post',
|
|
224
|
-
contentType: 'application/json',
|
|
225
|
-
data: {
|
|
226
|
-
"q": "select id, productName from product"
|
|
227
|
-
}
|
|
228
|
-
}).then(
|
|
229
|
-
res => { console.log(res); },
|
|
230
|
-
err => { console.log(err); }
|
|
231
|
-
)
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
### 上传文件
|
|
235
|
-
|
|
236
|
-
```javascript
|
|
237
|
-
var fileObj = document.getElementById("FileUpload").files[0];
|
|
238
|
-
lapp.connection.invoke({
|
|
239
|
-
url: '/data/v1/objects/document/file/create',
|
|
240
|
-
method: 'post',
|
|
241
|
-
contentType: 'multipart/form-data',
|
|
242
|
-
data: {
|
|
243
|
-
file: fileObj
|
|
244
|
-
}
|
|
245
|
-
}).then(
|
|
246
|
-
res => { console.log(res); },
|
|
247
|
-
err => { console.log(err); }
|
|
248
|
-
)
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
### 调用自定义 API
|
|
252
|
-
|
|
253
|
-
```javascript
|
|
254
|
-
lapp.connection.invoke({
|
|
255
|
-
url: '/rest/custom/v2.0/getData?keyword=test',
|
|
256
|
-
method: 'GET'
|
|
257
|
-
}).then(
|
|
258
|
-
res => { console.log(res); },
|
|
259
|
-
err => { console.log(err); }
|
|
260
|
-
)
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
---
|
|
264
|
-
|
|
265
|
-
## 4. 页面集成到系统
|
|
266
|
-
|
|
267
|
-
### 步骤
|
|
268
|
-
|
|
269
|
-
1. 开发自定义页面(HTML/JS/CSS)
|
|
270
|
-
2. 在系统后台 → 开发 → 页面代码 → 新建页面代码
|
|
271
|
-
3. 上传页面代码包(ZIP 格式)
|
|
272
|
-
4. 配置入口页面
|
|
273
|
-
5. 复制入口页面地址
|
|
274
|
-
6. 将地址配置到需要展示的位置(详情页嵌入、自定义按钮、菜单等)
|
|
275
|
-
|
|
276
|
-
### 常见配置位置
|
|
277
|
-
|
|
278
|
-
- 自定义按钮打开新页面
|
|
279
|
-
- 自定义菜单页面 URL
|
|
280
|
-
- 首页布局嵌入页面组件
|
|
281
|
-
- 详情页布局嵌入页面组件
|
|
282
|
-
- 外部系统集成
|
|
283
|
-
|
|
284
|
-
---
|
|
285
|
-
|
|
286
|
-
## 5. 注意事项
|
|
287
|
-
|
|
288
|
-
1. **必须使用入口页面复制的地址**,不支持重定向后的静态地址
|
|
289
|
-
2. 认证方式为 session 的页面代码**不支持添加 access_token 参数**
|
|
290
|
-
3. 一个页面代码包下最多配置 **10 个页面入口**
|
|
291
|
-
4. 入口页面在所有页面代码包中**必须唯一**
|
|
292
|
-
5. 页面代码最大大小 **512 KB/租户**
|
|
293
|
-
6. 支持**无感知发布**(启用状态下直接上传新版本)
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
# 技能包:流程扩展开发
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
销售易 PaaS 平台支持在多种流程的各个节点中嵌入自定义业务逻辑,包括审批流、自动流、工作流和可视化流。
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## 1. 新版审批流扩展
|
|
10
|
-
|
|
11
|
-
### 支持的扩展点
|
|
12
|
-
|
|
13
|
-
#### 提交节点事件
|
|
14
|
-
|
|
15
|
-
| 事件 | 说明 |
|
|
16
|
-
|------|------|
|
|
17
|
-
| 提交前校验 | 提交审批前的数据校验 |
|
|
18
|
-
| 提交前 | 提交审批前执行的逻辑 |
|
|
19
|
-
| 提交后 | 提交审批后执行的逻辑 |
|
|
20
|
-
|
|
21
|
-
#### 人工节点事件
|
|
22
|
-
|
|
23
|
-
| 事件 | 说明 |
|
|
24
|
-
|------|------|
|
|
25
|
-
| 通过前校验 | 审批通过前的校验 |
|
|
26
|
-
| 通过前 | 审批通过前执行的逻辑 |
|
|
27
|
-
| 通过后 | 审批通过后执行的逻辑 |
|
|
28
|
-
| 拒绝前校验 | 审批拒绝前的校验 |
|
|
29
|
-
| 拒绝前 | 审批拒绝前执行的逻辑 |
|
|
30
|
-
| 拒绝后 | 审批拒绝后执行的逻辑 |
|
|
31
|
-
| 转办后 | 转办操作后执行的逻辑 |
|
|
32
|
-
| 加签后 | 加签操作后执行的逻辑 |
|
|
33
|
-
| 到达后通过 | 到达节点后自动通过 |
|
|
34
|
-
| 到达后拒绝 | 到达节点后自动拒绝 |
|
|
35
|
-
| 动态选人 | 动态指定审批人 |
|
|
36
|
-
|
|
37
|
-
#### 流程级事件
|
|
38
|
-
|
|
39
|
-
| 事件 | 说明 |
|
|
40
|
-
|------|------|
|
|
41
|
-
| 审批通过后 | 整个审批流程通过后 |
|
|
42
|
-
| 审批拒绝后 | 整个审批流程拒绝后 |
|
|
43
|
-
| 审批撤回前 | 撤回审批前 |
|
|
44
|
-
| 审批撤回后 | 撤回审批后 |
|
|
45
|
-
|
|
46
|
-
### 配置文件示例
|
|
47
|
-
|
|
48
|
-
```xml
|
|
49
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
50
|
-
<configs>
|
|
51
|
-
<config>
|
|
52
|
-
<approvalFlow>
|
|
53
|
-
<object>{objectApiKey}__c</object>
|
|
54
|
-
<event>beforeSubmitValidation</event>
|
|
55
|
-
<class>other.{company}.{project}.approval.SubmitValidation</class>
|
|
56
|
-
</approvalFlow>
|
|
57
|
-
</config>
|
|
58
|
-
</configs>
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
---
|
|
62
|
-
|
|
63
|
-
## 2. 工作流扩展
|
|
64
|
-
|
|
65
|
-
### 支持的扩展点
|
|
66
|
-
|
|
67
|
-
#### 人工任务节点事件
|
|
68
|
-
|
|
69
|
-
| 事件 | 说明 |
|
|
70
|
-
|------|------|
|
|
71
|
-
| 推进前校验 | 推进前的数据校验 |
|
|
72
|
-
| 推进前 | 推进前执行的逻辑 |
|
|
73
|
-
| 推进后 | 推进后执行的逻辑 |
|
|
74
|
-
| 退回前校验 | 退回前的校验 |
|
|
75
|
-
| 退回前 | 退回前执行的逻辑 |
|
|
76
|
-
| 退回后 | 退回后执行的逻辑 |
|
|
77
|
-
| 到达后 | 到达节点后执行的逻辑 |
|
|
78
|
-
| 动态选人 | 动态指定处理人 |
|
|
79
|
-
|
|
80
|
-
#### 自动任务节点事件
|
|
81
|
-
|
|
82
|
-
自动任务节点到达时自动执行自定义逻辑。
|
|
83
|
-
|
|
84
|
-
#### 流程级事件
|
|
85
|
-
|
|
86
|
-
| 事件 | 说明 |
|
|
87
|
-
|------|------|
|
|
88
|
-
| 提交前校验 | 提交流程前的校验 |
|
|
89
|
-
| 提交前 | 提交流程前执行的逻辑 |
|
|
90
|
-
| 提交后 | 提交流程后执行的逻辑 |
|
|
91
|
-
| 流程通过后 | 整个流程通过后 |
|
|
92
|
-
| 流程退回后 | 整个流程退回后 |
|
|
93
|
-
| 流程撤回前 | 撤回流程前 |
|
|
94
|
-
| 流程撤回后 | 撤回流程后 |
|
|
95
|
-
|
|
96
|
-
---
|
|
97
|
-
|
|
98
|
-
## 3. 可视化流扩展
|
|
99
|
-
|
|
100
|
-
### 支持的扩展点
|
|
101
|
-
|
|
102
|
-
#### 阶段节点事件
|
|
103
|
-
|
|
104
|
-
| 事件 | 说明 |
|
|
105
|
-
|------|------|
|
|
106
|
-
| 阶段到达前校验 | 进入阶段前的校验 |
|
|
107
|
-
| 阶段到达后 | 进入阶段后执行的逻辑 |
|
|
108
|
-
| 阶段推进后 | 阶段推进后执行的逻辑 |
|
|
109
|
-
|
|
110
|
-
#### 流程级事件
|
|
111
|
-
|
|
112
|
-
| 事件 | 说明 |
|
|
113
|
-
|------|------|
|
|
114
|
-
| 重新激活后 | 流程重新激活后执行的逻辑 |
|
|
115
|
-
|
|
116
|
-
---
|
|
117
|
-
|
|
118
|
-
## 4. 自动流扩展
|
|
119
|
-
|
|
120
|
-
自动流中嵌入自定义业务逻辑,在自动流节点执行时触发。
|
|
121
|
-
|
|
122
|
-
---
|
|
123
|
-
|
|
124
|
-
## 5. 触发规则扩展
|
|
125
|
-
|
|
126
|
-
在触发规则中嵌入自定义业务逻辑,当触发规则条件满足时执行。
|
|
127
|
-
|
|
128
|
-
---
|
|
129
|
-
|
|
130
|
-
## 6. 新公海业务扩展
|
|
131
|
-
|
|
132
|
-
### 支持的对象和操作
|
|
133
|
-
|
|
134
|
-
| 对象 | 扩展时机 | URL 包含 |
|
|
135
|
-
|------|----------|----------|
|
|
136
|
-
| 客户 | before | /account/highSeaOperate/before |
|
|
137
|
-
| 销售机会 | before | /opportunity/highSeaOperate/before |
|
|
138
|
-
| 销售线索 | before | /lead/highSeaOperate/before |
|
|
139
|
-
|
|
140
|
-
### 请求参数
|
|
141
|
-
|
|
142
|
-
```json
|
|
143
|
-
{
|
|
144
|
-
"ids": [数据ID集合],
|
|
145
|
-
"operateType": "公海操作类型",
|
|
146
|
-
"targetUserId": "目标用户ID",
|
|
147
|
-
"targetHighSeaId": "目标公海ID"
|
|
148
|
-
}
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
### 返回参数
|
|
152
|
-
|
|
153
|
-
```json
|
|
154
|
-
{
|
|
155
|
-
"status": 200,
|
|
156
|
-
"message": "成功",
|
|
157
|
-
"errorDatas": [
|
|
158
|
-
{
|
|
159
|
-
"id": "错误数据ID",
|
|
160
|
-
"message": "错误信息"
|
|
161
|
-
}
|
|
162
|
-
]
|
|
163
|
-
}
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
---
|
|
167
|
-
|
|
168
|
-
## 通用配置步骤
|
|
169
|
-
|
|
170
|
-
1. 在系统后台创建业务逻辑代码包
|
|
171
|
-
2. 编写实现对应接口的 Java 类
|
|
172
|
-
3. 编写 scriptTrigger.xml 配置文件
|
|
173
|
-
4. 打包上传并启用
|
|
174
|
-
5. 在系统后台配置扩展点绑定
|
|
175
|
-
6. 测试验证
|