lw-cdp-ui 1.1.24 → 1.1.26
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/dist/components/lwFlow/config/nodesList.js +3 -2
- package/dist/components/lwFlow/index.vue +4 -1
- package/dist/components/lwFlow/nodeEdit/basicSettings.vue +21 -0
- package/dist/components/lwFlow/nodes/custom.js +6 -4
- package/dist/components/lwFlow/nodesData/datas/eventReceive.js +60 -0
- package/dist/components/lwFlow/nodesData/datas/timer.js +1 -15
- package/dist/components/lwFlow/nodesData/index.js +11 -9
- package/dist/components/lwLayout/components/bu.vue +1 -1
- package/dist/components/lwLayout/components/userbar.vue +1 -0
- package/dist/components/lwLayout/index.vue +28 -8
- package/dist/lw-cdp-ui.esm.js +353 -282
- package/dist/lw-cdp-ui.umd.js +7 -7
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -65,7 +65,8 @@ export default [
|
|
|
65
65
|
name: '接收事件',
|
|
66
66
|
icon: 'icon-event',
|
|
67
67
|
type: 'event_receive',
|
|
68
|
-
themeColor: '#
|
|
68
|
+
themeColor: '#39bcc5',
|
|
69
|
+
background: '#f2fcfa'
|
|
69
70
|
},
|
|
70
71
|
{
|
|
71
72
|
name: '人群包',
|
|
@@ -81,7 +82,7 @@ export default [
|
|
|
81
82
|
{
|
|
82
83
|
name: '短信',
|
|
83
84
|
icon: 'icon-auto-reply',
|
|
84
|
-
type: '
|
|
85
|
+
type: 'sms',
|
|
85
86
|
themeColor: '#4594f3'
|
|
86
87
|
},
|
|
87
88
|
{
|
|
@@ -365,8 +365,11 @@ export default {
|
|
|
365
365
|
case 'reduce':
|
|
366
366
|
await et2lTable(this.logicFlow, node);
|
|
367
367
|
break;
|
|
368
|
+
case 'event_receive':
|
|
369
|
+
await nodeCustom(this.logicFlow, node, this.$store.state);
|
|
370
|
+
break;
|
|
368
371
|
default:
|
|
369
|
-
await nodeCustom(this.logicFlow, node);
|
|
372
|
+
await nodeCustom(this.logicFlow, node, this.$store.state);
|
|
370
373
|
break;
|
|
371
374
|
}
|
|
372
375
|
}
|
|
@@ -112,6 +112,27 @@ export default {
|
|
|
112
112
|
if (nodeConfig?.labelPosition) {
|
|
113
113
|
config.labelPosition = nodeConfig.labelPosition
|
|
114
114
|
}
|
|
115
|
+
|
|
116
|
+
// 处理需要接口的内容
|
|
117
|
+
if (!this.$store.state[`lwFlow_${this.type}`]) {
|
|
118
|
+
this.$store.state[`lwFlow_${this.type}`] = {}
|
|
119
|
+
}
|
|
120
|
+
nodeConfig.formItems.forEach(async item => {
|
|
121
|
+
if (item?.options?.items) {
|
|
122
|
+
if (item.api) {
|
|
123
|
+
let items = await item.api(this.$http)
|
|
124
|
+
item.options.items = items || []
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// 全局化选项内容 用于回显数据
|
|
128
|
+
if (item?.options?.name) {
|
|
129
|
+
this.$store.state[`lwFlow_${this.type}`][`${item.name}.${item.options.name}`] = item?.options?.items || ''
|
|
130
|
+
} else {
|
|
131
|
+
this.$store.state[`lwFlow_${this.type}`][item.name] = item?.options?.items || ''
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
})
|
|
135
|
+
|
|
115
136
|
if (nodeConfig?.formItems) {
|
|
116
137
|
config.formItems = nodeConfig.formItems
|
|
117
138
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import dayjs from 'dayjs'
|
|
5
5
|
import nodeDatas from '../nodesData/index.js'
|
|
6
|
-
export default function registerCustom(lf, node) {
|
|
6
|
+
export default function registerCustom(lf, node, state) {
|
|
7
7
|
// 是否显示
|
|
8
8
|
function hideHandle(item, data) {
|
|
9
9
|
if (Object.keys(data).length == 0) return false
|
|
@@ -35,9 +35,11 @@ export default function registerCustom(lf, node) {
|
|
|
35
35
|
value = dayjs(value).format(item['value-format'] || 'YYYY-MM-DD HH:mm:ss')
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
+
|
|
38
39
|
// 转换
|
|
39
|
-
if (item
|
|
40
|
-
let
|
|
40
|
+
if (state[`lwFlow_${node.type}`] && state[`lwFlow_${node.type}`][item.value]) {
|
|
41
|
+
let items = state[`lwFlow_${node.type}`][item.value]
|
|
42
|
+
let x = items.find((x) => {
|
|
41
43
|
return x.value == value
|
|
42
44
|
})
|
|
43
45
|
value = x?.label
|
|
@@ -65,7 +67,7 @@ export default function registerCustom(lf, node) {
|
|
|
65
67
|
el.style.borderColor = properties?.style?.borderColor || node.themeColor || ''
|
|
66
68
|
el.style.borderWidth = `${properties?.style?.borderWidth || 2}px`
|
|
67
69
|
el.style.color = properties?.style?.fontColor || '' // 使用 color 替代 font-color
|
|
68
|
-
el.style.fontSize = `${properties?.style?.fontSize ||
|
|
70
|
+
el.style.fontSize = `${properties?.style?.fontSize || 12}px` // 默认字体大小为 12px
|
|
69
71
|
el.style.fontFamily = properties?.style?.fontFamily || 'Microsoft YaHei' // 添加默认字体
|
|
70
72
|
el.style.lineHeight = properties?.style?.lineHeight || '1'
|
|
71
73
|
el.style.fontWeight = properties?.style?.fontWeight || ''
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 营销目标: 接收事件
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
// 暂无显示需求
|
|
7
|
+
nodeHtml: [
|
|
8
|
+
{
|
|
9
|
+
label: '事件',
|
|
10
|
+
component: 'select',
|
|
11
|
+
value: 'behaviorId'
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
// 目标节点校验
|
|
15
|
+
targetRules: [],
|
|
16
|
+
// 表单内容
|
|
17
|
+
formConfig: {
|
|
18
|
+
labelWidth: '70px',
|
|
19
|
+
labelPosition: 'top',
|
|
20
|
+
formItems: [
|
|
21
|
+
{
|
|
22
|
+
label: '选择事件',
|
|
23
|
+
name: 'behaviorId',
|
|
24
|
+
value: '',
|
|
25
|
+
component: 'select',
|
|
26
|
+
span: 24,
|
|
27
|
+
options: {
|
|
28
|
+
items: [],
|
|
29
|
+
placeholder: '请选择'
|
|
30
|
+
},
|
|
31
|
+
async api(http, value) {
|
|
32
|
+
const params = { fields: 'name,modelId,status' }
|
|
33
|
+
params.expression = `status in ENABLED`
|
|
34
|
+
if (value) {
|
|
35
|
+
params.expression = `name like ${value} AND ${params.expression}`
|
|
36
|
+
}
|
|
37
|
+
let list = await http.get(`/api/ma-manage/{tenantId}/{buCode}/behavior-event/list`, params)
|
|
38
|
+
|
|
39
|
+
list = list.map((item) => ({
|
|
40
|
+
value: item.id,
|
|
41
|
+
label: `[${item.name}] ${item.id}`
|
|
42
|
+
}))
|
|
43
|
+
return list
|
|
44
|
+
},
|
|
45
|
+
rules: [{ required: true, message: '不能为空', trigger: 'change' }]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
label: '描述信息',
|
|
49
|
+
name: 'desp',
|
|
50
|
+
value: '',
|
|
51
|
+
component: 'input',
|
|
52
|
+
options: {
|
|
53
|
+
type: 'textarea',
|
|
54
|
+
placeholder: '请输入'
|
|
55
|
+
},
|
|
56
|
+
span: 24
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -8,21 +8,7 @@ export default {
|
|
|
8
8
|
{
|
|
9
9
|
label: '定时器类型',
|
|
10
10
|
component: 'radio',
|
|
11
|
-
value: 'schedule.type'
|
|
12
|
-
items: [
|
|
13
|
-
{
|
|
14
|
-
label: '单次',
|
|
15
|
-
value: 'DATE'
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
label: '多次',
|
|
19
|
-
value: 'CRON'
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
label: '延时',
|
|
23
|
-
value: 'DELAY'
|
|
24
|
-
}
|
|
25
|
-
]
|
|
11
|
+
value: 'schedule.type'
|
|
26
12
|
},
|
|
27
13
|
{
|
|
28
14
|
label: '日期时间',
|
|
@@ -19,15 +19,17 @@ import reduce from './datas/reduce'
|
|
|
19
19
|
import source from './datas/source'
|
|
20
20
|
import target from './datas/target'
|
|
21
21
|
import timer from './datas/timer'
|
|
22
|
+
import event_receive from './datas/eventReceive'
|
|
22
23
|
|
|
23
24
|
export default {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
collap,
|
|
26
|
+
expand,
|
|
27
|
+
filter,
|
|
28
|
+
joiner,
|
|
29
|
+
mapper,
|
|
30
|
+
reduce,
|
|
31
|
+
source,
|
|
32
|
+
target,
|
|
33
|
+
timer,
|
|
34
|
+
event_receive
|
|
33
35
|
}
|
|
@@ -59,7 +59,7 @@ export default {
|
|
|
59
59
|
let buCode = this.$tool.data.get('buCode')
|
|
60
60
|
if (!this.buList.length) {
|
|
61
61
|
let buResult = await this.$api.auth.bu()
|
|
62
|
-
let bu = buResult
|
|
62
|
+
let bu = buResult || []
|
|
63
63
|
this.$tool.data.set('buList', bu)
|
|
64
64
|
this.buList = bu
|
|
65
65
|
this.$tool.data.set('buCode', bu[0].code)
|
|
@@ -23,7 +23,11 @@
|
|
|
23
23
|
</div>
|
|
24
24
|
<div class="adminui-header-right">
|
|
25
25
|
<userbar :isShowBu="isShowBu"
|
|
26
|
-
:isInitialized="isInitialized"
|
|
26
|
+
:isInitialized="isInitialized">
|
|
27
|
+
<template #userbarActionBox>
|
|
28
|
+
<slot name="userbarActionBox"></slot>
|
|
29
|
+
</template>
|
|
30
|
+
</userbar>
|
|
27
31
|
</div>
|
|
28
32
|
</header>
|
|
29
33
|
<section class="aminui-wrapper">
|
|
@@ -45,7 +49,8 @@
|
|
|
45
49
|
</div>
|
|
46
50
|
<div class="adminui-side-bottom"
|
|
47
51
|
@click="$store.commit('TOGGLE_menuIsCollapse')">
|
|
48
|
-
<el-icon><el-icon-expand v-if="menuIsCollapse" /><el-icon-fold
|
|
52
|
+
<el-icon><el-icon-expand v-if="menuIsCollapse" /><el-icon-fold
|
|
53
|
+
v-else /></el-icon>
|
|
49
54
|
</div>
|
|
50
55
|
</div>
|
|
51
56
|
<Side-m v-if="ismobile"></Side-m>
|
|
@@ -94,7 +99,8 @@
|
|
|
94
99
|
</div>
|
|
95
100
|
<div class="adminui-side-bottom"
|
|
96
101
|
@click="$store.commit('TOGGLE_menuIsCollapse')">
|
|
97
|
-
<el-icon><el-icon-expand v-if="menuIsCollapse" /><el-icon-fold
|
|
102
|
+
<el-icon><el-icon-expand v-if="menuIsCollapse" /><el-icon-fold
|
|
103
|
+
v-else /></el-icon>
|
|
98
104
|
</div>
|
|
99
105
|
</div>
|
|
100
106
|
<Side-m v-if="ismobile"></Side-m>
|
|
@@ -105,14 +111,19 @@
|
|
|
105
111
|
<Topbar v-if="!ismobile"></Topbar>
|
|
106
112
|
</div>
|
|
107
113
|
<userbar :isShowBu="isShowBu"
|
|
108
|
-
:isInitialized="isInitialized"
|
|
114
|
+
:isInitialized="isInitialized">
|
|
115
|
+
<template #userbarActionBox>
|
|
116
|
+
<slot name="userbarActionBox"></slot>
|
|
117
|
+
</template>
|
|
118
|
+
</userbar>
|
|
109
119
|
</div>
|
|
110
120
|
<Tags v-if="!ismobile && layoutTags"></Tags>
|
|
111
121
|
<div class="adminui-main"
|
|
112
122
|
id="adminui-main">
|
|
113
123
|
<slot name="routerView">
|
|
114
124
|
<router-view v-slot="{ Component }">
|
|
115
|
-
<keep-alive
|
|
125
|
+
<keep-alive
|
|
126
|
+
:include="this.$store.state.keepAlive.keepLiveRoute">
|
|
116
127
|
<component :is="Component"
|
|
117
128
|
:key="$route.fullPath"
|
|
118
129
|
v-if="$store.state.keepAlive.routeShow" />
|
|
@@ -150,7 +161,11 @@
|
|
|
150
161
|
</div>
|
|
151
162
|
<Side-m v-if="ismobile"></Side-m>
|
|
152
163
|
<userbar :isShowBu="isShowBu"
|
|
153
|
-
:isInitialized="isInitialized"
|
|
164
|
+
:isInitialized="isInitialized">
|
|
165
|
+
<template #userbarActionBox>
|
|
166
|
+
<slot name="userbarActionBox"></slot>
|
|
167
|
+
</template>
|
|
168
|
+
</userbar>
|
|
154
169
|
</div>
|
|
155
170
|
</header>
|
|
156
171
|
<section class="aminui-wrapper">
|
|
@@ -216,14 +231,19 @@
|
|
|
216
231
|
</div>
|
|
217
232
|
<div class="adminui-side-bottom"
|
|
218
233
|
@click="$store.commit('TOGGLE_menuIsCollapse')">
|
|
219
|
-
<el-icon><el-icon-expand v-if="menuIsCollapse" /><el-icon-fold
|
|
234
|
+
<el-icon><el-icon-expand v-if="menuIsCollapse" /><el-icon-fold
|
|
235
|
+
v-else /></el-icon>
|
|
220
236
|
</div>
|
|
221
237
|
</div>
|
|
222
238
|
<Side-m v-if="ismobile"></Side-m>
|
|
223
239
|
<div class="aminui-body el-container">
|
|
224
240
|
<Topbar>
|
|
225
241
|
<userbar :isShowBu="isShowBu"
|
|
226
|
-
:isInitialized="isInitialized"
|
|
242
|
+
:isInitialized="isInitialized">
|
|
243
|
+
<template #userbarActionBox>
|
|
244
|
+
<slot name="userbarActionBox"></slot>
|
|
245
|
+
</template>
|
|
246
|
+
</userbar>
|
|
227
247
|
</Topbar>
|
|
228
248
|
<Tags v-if="!ismobile && layoutTags"></Tags>
|
|
229
249
|
<div class="adminui-main"
|