lw-cdp-ui 1.2.47 → 1.2.49
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/package.json +1 -1
- package/dist/assets/images/empty.jpg +0 -0
- package/dist/assets/images/login.svg +0 -558
- package/dist/assets/images/logo.jpg +0 -0
- package/dist/assets/images/logo.svg +0 -78
- package/dist/assets/images/logo1.svg +0 -86
- package/dist/assets/images/register.svg +0 -351
- package/dist/components/lwCronSelect/index.vue +0 -218
- package/dist/components/lwFlow/components/lfControl.vue +0 -126
- package/dist/components/lwFlow/components/lfNodePanel.vue +0 -98
- package/dist/components/lwFlow/config/dagre.js +0 -279
- package/dist/components/lwFlow/config/nodesList.js +0 -243
- package/dist/components/lwFlow/index.vue +0 -781
- package/dist/components/lwFlow/nodeEdit/audienceReceive.vue +0 -262
- package/dist/components/lwFlow/nodeEdit/basicSettings.vue +0 -88
- package/dist/components/lwFlow/nodeEdit/eventReceive.vue +0 -145
- package/dist/components/lwFlow/nodeEdit/index.vue +0 -306
- package/dist/components/lwFlow/nodeEdit/sms.vue +0 -107
- package/dist/components/lwFlow/nodeEdit/styleSettings.vue +0 -236
- package/dist/components/lwFlow/nodes/basisEnd.js +0 -56
- package/dist/components/lwFlow/nodes/basisStart.js +0 -56
- package/dist/components/lwFlow/nodes/custom.js +0 -129
- package/dist/components/lwFlow/nodes/et2lTable.js +0 -132
- package/dist/components/lwFlow/nodesData/datas/audienceReceive.js +0 -137
- package/dist/components/lwFlow/nodesData/datas/base.js +0 -190
- package/dist/components/lwFlow/nodesData/datas/collap.js +0 -95
- package/dist/components/lwFlow/nodesData/datas/eventReceive.js +0 -106
- package/dist/components/lwFlow/nodesData/datas/expand.js +0 -85
- package/dist/components/lwFlow/nodesData/datas/filter.js +0 -85
- package/dist/components/lwFlow/nodesData/datas/joiner.js +0 -96
- package/dist/components/lwFlow/nodesData/datas/mapper.js +0 -111
- package/dist/components/lwFlow/nodesData/datas/reduce.js +0 -69
- package/dist/components/lwFlow/nodesData/datas/sms.js +0 -69
- package/dist/components/lwFlow/nodesData/datas/source.js +0 -142
- package/dist/components/lwFlow/nodesData/datas/target.js +0 -95
- package/dist/components/lwFlow/nodesData/datas/timer.js +0 -180
- package/dist/components/lwFlow/nodesData/index.js +0 -41
- package/dist/components/lwForm/index.vue +0 -631
- package/dist/components/lwFormJson/JsonItem.vue +0 -302
- package/dist/components/lwFormJson/StatsConfig.vue +0 -544
- package/dist/components/lwFormJson/TreeItem.vue +0 -149
- package/dist/components/lwFormJson/index.vue +0 -362
- package/dist/components/lwFormJson/menuList.js +0 -324
- package/dist/components/lwFormMini/FormItem.vue +0 -466
- package/dist/components/lwFormMini/ViewItem.vue +0 -391
- package/dist/components/lwFormMini/index.vue +0 -421
- package/dist/components/lwFormMini/textToPassword.vue +0 -61
- package/dist/components/lwFormView/index.vue +0 -390
- package/dist/components/lwFormView/textToPassword.vue +0 -59
- package/dist/components/lwIconSelect/iconSelect.js +0 -289
- package/dist/components/lwIconSelect/index.vue +0 -142
- package/dist/components/lwLayout/components/NavMenu.vue +0 -36
- package/dist/components/lwLayout/components/aside.vue +0 -295
- package/dist/components/lwLayout/components/bu.vue +0 -88
- package/dist/components/lwLayout/components/iframeView.vue +0 -57
- package/dist/components/lwLayout/components/lang.vue +0 -77
- package/dist/components/lwLayout/components/setting.vue +0 -102
- package/dist/components/lwLayout/components/sideM.vue +0 -135
- package/dist/components/lwLayout/components/tags.vue +0 -388
- package/dist/components/lwLayout/components/topbar.vue +0 -69
- package/dist/components/lwLayout/components/userbar.vue +0 -214
- package/dist/components/lwLayout/index.vue +0 -460
- package/dist/components/lwLogin/index.vue +0 -506
- package/dist/components/lwLogin/locale/en-us.js +0 -37
- package/dist/components/lwLogin/locale/zh-cn.js +0 -37
- package/dist/components/lwSearch/date/date.vue +0 -113
- package/dist/components/lwSearch/dateRange/dateRange.vue +0 -118
- package/dist/components/lwSearch/dates/dates.vue +0 -366
- package/dist/components/lwSearch/index.vue +0 -628
- package/dist/components/lwSearch/input/input.vue +0 -55
- package/dist/components/lwSearch/locale/en-us.js +0 -15
- package/dist/components/lwSearch/locale/zh-cn.js +0 -15
- package/dist/components/lwSearch/select/select.vue +0 -58
- package/dist/components/lwSvgIcon/index.vue +0 -29
- package/dist/components/lwTable/index.js +0 -286
- package/dist/components/lwTable/index.scss +0 -238
- package/dist/components/lwTable/index.vue +0 -344
- package/dist/components/lwTable/locale/en-US.js +0 -26
- package/dist/components/lwTable/locale/zh-CN.js +0 -26
- package/dist/components/lwTable/useFullscreen.js +0 -73
- package/dist/components/lwTableForm/index.vue +0 -662
- package/dist/components/lwTableSelect/index.vue +0 -266
- package/dist/components/lwTableSelect/tableSelect.js +0 -23
- package/dist/components/lwUpload/index.vue +0 -564
- package/dist/lw-cdp-ui.esm.js +0 -19893
- package/dist/lw-cdp-ui.umd.js +0 -22
- package/dist/style.css +0 -1
- package/dist/vite.svg +0 -1
|
@@ -1,306 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-drawer v-model="isShow"
|
|
3
|
-
title="节点编辑"
|
|
4
|
-
direction="rtl"
|
|
5
|
-
:append-to-body="true"
|
|
6
|
-
:size="600"
|
|
7
|
-
:before-close="close">
|
|
8
|
-
<div v-if="isShow"
|
|
9
|
-
class="drawer-form">
|
|
10
|
-
<el-collapse v-model="activeName"
|
|
11
|
-
accordion>
|
|
12
|
-
<el-collapse-item title="基础信息"
|
|
13
|
-
name="basicInfo">
|
|
14
|
-
<!-- 说明:
|
|
15
|
-
此处如果对应的节点没有特别的处理直接使用 basicSettings 就可
|
|
16
|
-
如果这个节点有特别的操作 请自定义节点组件 以防默认组件过于庞大-->
|
|
17
|
-
|
|
18
|
-
<!-- 营销目标 -->
|
|
19
|
-
<template v-if="['audience_receive'].includes(nodeData.type)">
|
|
20
|
-
<audienceReceive ref="dataFormRef"
|
|
21
|
-
v-model="dataForm.properties.data"
|
|
22
|
-
:type="nodeData.type"
|
|
23
|
-
:lf="lf" />
|
|
24
|
-
</template>
|
|
25
|
-
<template v-if="['event_receive'].includes(nodeData.type)">
|
|
26
|
-
<eventReceive ref="dataFormRef"
|
|
27
|
-
v-model="dataForm.properties.data"
|
|
28
|
-
:config="config" />
|
|
29
|
-
</template>
|
|
30
|
-
<template v-if="['sms'].includes(nodeData.type)">
|
|
31
|
-
<sms ref="dataFormRef"
|
|
32
|
-
v-model="dataForm.properties.data"
|
|
33
|
-
:config="config" />
|
|
34
|
-
</template>
|
|
35
|
-
<!-- 默认 -->
|
|
36
|
-
<template v-else>
|
|
37
|
-
<basicSettings ref="dataFormRef"
|
|
38
|
-
v-model="dataForm.properties.data"
|
|
39
|
-
:soltList="soltList"
|
|
40
|
-
:config="config">
|
|
41
|
-
<template v-slot:[soltName]="{itemCur, formCur}"
|
|
42
|
-
v-for="soltName in soltList">
|
|
43
|
-
<slot :name="soltName"
|
|
44
|
-
:itemCur="itemCur"
|
|
45
|
-
:formCur="formCur"></slot>
|
|
46
|
-
</template>
|
|
47
|
-
|
|
48
|
-
</basicSettings>
|
|
49
|
-
</template>
|
|
50
|
-
|
|
51
|
-
</el-collapse-item>
|
|
52
|
-
<el-collapse-item title="样式设置"
|
|
53
|
-
name="styleSettings">
|
|
54
|
-
<!-- 基础设置 -->
|
|
55
|
-
<el-alert title="基础属性修改就会同步显示,不需要点击保存"
|
|
56
|
-
type="success"
|
|
57
|
-
style="margin-bottom: 10px;"></el-alert>
|
|
58
|
-
<styleSettings v-model="dataForm.properties.style"
|
|
59
|
-
:lf="lf"
|
|
60
|
-
:id="dataForm.id" />
|
|
61
|
-
</el-collapse-item>
|
|
62
|
-
</el-collapse>
|
|
63
|
-
</div>
|
|
64
|
-
|
|
65
|
-
<template #footer>
|
|
66
|
-
<el-button @click="close">取 消</el-button>
|
|
67
|
-
<el-button type="primary"
|
|
68
|
-
@click="onSubmit">保存</el-button>
|
|
69
|
-
</template>
|
|
70
|
-
</el-drawer>
|
|
71
|
-
|
|
72
|
-
</template>
|
|
73
|
-
<script>
|
|
74
|
-
import audienceReceive from './audienceReceive.vue'
|
|
75
|
-
import eventReceive from './eventReceive.vue'
|
|
76
|
-
import sms from './sms.vue'
|
|
77
|
-
import basicSettings from './basicSettings.vue'
|
|
78
|
-
import styleSettings from './styleSettings.vue'
|
|
79
|
-
|
|
80
|
-
import nodeDatas from '../nodesData/index.js'
|
|
81
|
-
|
|
82
|
-
export default {
|
|
83
|
-
name: 'drawerForm',
|
|
84
|
-
components: {
|
|
85
|
-
audienceReceive,
|
|
86
|
-
eventReceive,
|
|
87
|
-
sms,
|
|
88
|
-
basicSettings,
|
|
89
|
-
styleSettings
|
|
90
|
-
},
|
|
91
|
-
props: {
|
|
92
|
-
nodeData: { type: Object, default: () => { } },
|
|
93
|
-
nodesDataConfig: { type: Object, default: () => { } },
|
|
94
|
-
lf: {
|
|
95
|
-
type: Object,
|
|
96
|
-
default: () => { }
|
|
97
|
-
},
|
|
98
|
-
drawerShow: { type: Boolean, default: false },
|
|
99
|
-
soltList: { type: Array, default: () => { return [] } },
|
|
100
|
-
},
|
|
101
|
-
watch: {
|
|
102
|
-
drawerShow: {
|
|
103
|
-
handler(val) {
|
|
104
|
-
if (val) {
|
|
105
|
-
this.dataForm = { ...this.dataForm, ...this.nodeData }
|
|
106
|
-
}
|
|
107
|
-
this.isShow = val
|
|
108
|
-
},
|
|
109
|
-
immediate: true
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
data() {
|
|
113
|
-
return {
|
|
114
|
-
activeName: 'basicInfo',
|
|
115
|
-
...nodeDatas,
|
|
116
|
-
dataForm: {
|
|
117
|
-
text: { value: '' },
|
|
118
|
-
properties: {
|
|
119
|
-
data: {},
|
|
120
|
-
style: {},
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
isShow: false
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
|
-
computed: {
|
|
127
|
-
config() {
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* 深度合并两个对象
|
|
131
|
-
* @param {Object} target 基础对象
|
|
132
|
-
* @param {Object} source 覆盖的对象
|
|
133
|
-
* @returns {Object} 合并后的对象
|
|
134
|
-
*/
|
|
135
|
-
function deepMerge(target, source) {
|
|
136
|
-
// 如果 target 不是对象,则直接返回 source(注意:这里假设 source 一定有意义)
|
|
137
|
-
if (typeof target !== 'object' || target === null) {
|
|
138
|
-
return source;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
// 遍历 source 的每个属性
|
|
142
|
-
for (const key in source) {
|
|
143
|
-
if (source.hasOwnProperty(key)) {
|
|
144
|
-
const sourceValue = source[key];
|
|
145
|
-
const targetValue = target[key];
|
|
146
|
-
|
|
147
|
-
// 特殊处理 formItems 数组
|
|
148
|
-
if (key === 'formItems' && Array.isArray(sourceValue)) {
|
|
149
|
-
target[key] = mergeFormItems(targetValue, sourceValue);
|
|
150
|
-
} else if (Array.isArray(sourceValue)) {
|
|
151
|
-
// 非 formItems 数组直接覆盖(也可根据需要扩展其他数组的合并规则)
|
|
152
|
-
target[key] = sourceValue.slice();
|
|
153
|
-
} else if (typeof sourceValue === 'object' && sourceValue !== null) {
|
|
154
|
-
// 如果 target 中对应属性不是对象,则先置为空对象
|
|
155
|
-
if (typeof targetValue !== 'object' || targetValue === null) {
|
|
156
|
-
target[key] = {};
|
|
157
|
-
}
|
|
158
|
-
// 递归合并对象
|
|
159
|
-
target[key] = deepMerge(target[key], sourceValue);
|
|
160
|
-
} else {
|
|
161
|
-
// 基本数据类型直接覆盖
|
|
162
|
-
target[key] = sourceValue;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
return target;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* 对 formItems 数组进行合并
|
|
172
|
-
* @param {Array} baseItems 基础 formItems 数组(可能为空)
|
|
173
|
-
* @param {Array} overrideItems 覆盖的 formItems 数组
|
|
174
|
-
* @returns {Array} 合并后的 formItems 数组
|
|
175
|
-
*/
|
|
176
|
-
function mergeFormItems(baseItems, overrideItems) {
|
|
177
|
-
// 如果基础数据不存在或不是数组,则初始化为空数组
|
|
178
|
-
if (!Array.isArray(baseItems)) {
|
|
179
|
-
baseItems = [];
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
// 遍历覆盖数组中的每一项
|
|
183
|
-
overrideItems.forEach(overrideItem => {
|
|
184
|
-
let matched = false;
|
|
185
|
-
// 遍历基础数组中所有 name 相同的项
|
|
186
|
-
baseItems.forEach((baseItem, index) => {
|
|
187
|
-
if (baseItem.name === overrideItem.name) {
|
|
188
|
-
// 如果覆盖项设置了 hideHandle,则只有在 hideHandle 值相同的情况下才进行合并
|
|
189
|
-
if (overrideItem.hasOwnProperty('hideHandle')) {
|
|
190
|
-
if (baseItem.hideHandle === overrideItem.hideHandle) {
|
|
191
|
-
baseItems[index] = deepMerge(baseItem, overrideItem);
|
|
192
|
-
matched = true;
|
|
193
|
-
}
|
|
194
|
-
} else {
|
|
195
|
-
// 如果没有设置 hideHandle,则覆盖所有 name 相同的项
|
|
196
|
-
baseItems[index] = deepMerge(baseItem, overrideItem);
|
|
197
|
-
matched = true;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
});
|
|
201
|
-
// 如果没有找到匹配项,则直接添加新的项(深拷贝以防引用问题)
|
|
202
|
-
if (!matched) {
|
|
203
|
-
baseItems.push(JSON.parse(JSON.stringify(overrideItem)));
|
|
204
|
-
}
|
|
205
|
-
});
|
|
206
|
-
|
|
207
|
-
return baseItems;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
// 默认配置
|
|
212
|
-
let config = {
|
|
213
|
-
labelWidth: '70px',
|
|
214
|
-
labelPosition: 'top',
|
|
215
|
-
formItems: [
|
|
216
|
-
{
|
|
217
|
-
label: '节点名称',
|
|
218
|
-
name: 'name',
|
|
219
|
-
value: '',
|
|
220
|
-
component: 'input',
|
|
221
|
-
options: {
|
|
222
|
-
placeholder: '请输入节点名称'
|
|
223
|
-
},
|
|
224
|
-
span: 24
|
|
225
|
-
}
|
|
226
|
-
]
|
|
227
|
-
};
|
|
228
|
-
|
|
229
|
-
// 注意:基础数据以 nodeDatas 为主,节点配置(nodesDataConfig)覆盖其中的对应字段
|
|
230
|
-
let nodeDatasMerge = deepMerge(
|
|
231
|
-
nodeDatas,
|
|
232
|
-
this.nodesDataConfig
|
|
233
|
-
);
|
|
234
|
-
|
|
235
|
-
// 取出对应节点的表单配置
|
|
236
|
-
let nodeConfig = nodeDatasMerge[this.nodeData.type]?.formConfig || {};
|
|
237
|
-
|
|
238
|
-
// 深拷贝,避免直接修改全局配置
|
|
239
|
-
nodeConfig = JSON.parse(JSON.stringify(nodeConfig));
|
|
240
|
-
|
|
241
|
-
if (nodeConfig?.labelWidth) {
|
|
242
|
-
config.labelWidth = nodeConfig.labelWidth;
|
|
243
|
-
}
|
|
244
|
-
if (nodeConfig?.labelPosition) {
|
|
245
|
-
config.labelPosition = nodeConfig.labelPosition;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
// 处理需要接口的内容
|
|
249
|
-
if (!this.$store.state[`lwFlow_${this.nodeData.type}`]) {
|
|
250
|
-
this.$store.state[`lwFlow_${this.nodeData.type}`] = {};
|
|
251
|
-
}
|
|
252
|
-
nodeConfig?.formItems?.forEach(async item => {
|
|
253
|
-
if (item?.options?.items) {
|
|
254
|
-
if (item.api) {
|
|
255
|
-
let items = await item.api(this.$http);
|
|
256
|
-
item.options.items = items || [];
|
|
257
|
-
}
|
|
258
|
-
// 全局化选项内容 用于回显数据
|
|
259
|
-
if (item?.options?.name) {
|
|
260
|
-
this.$store.state[`lwFlow_${this.nodeData.type}`][`${item.name}.${item.options.name}`] =
|
|
261
|
-
item?.options?.items || '';
|
|
262
|
-
} else {
|
|
263
|
-
this.$store.state[`lwFlow_${this.nodeData.type}`][item.name] =
|
|
264
|
-
item?.options?.items || '';
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
});
|
|
268
|
-
|
|
269
|
-
if (nodeConfig?.formItems) {
|
|
270
|
-
config.formItems = nodeConfig.formItems;
|
|
271
|
-
}
|
|
272
|
-
return config;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
},
|
|
276
|
-
methods: {
|
|
277
|
-
async onSubmit() {
|
|
278
|
-
await this.$refs.dataFormRef.$refs.dataFormRef.validate();
|
|
279
|
-
const { id } = this.dataForm
|
|
280
|
-
this.lf.setProperties(id, {
|
|
281
|
-
...this.dataForm.properties
|
|
282
|
-
});
|
|
283
|
-
|
|
284
|
-
this.close()
|
|
285
|
-
},
|
|
286
|
-
close() {
|
|
287
|
-
this.isShow = false
|
|
288
|
-
this.$nextTick(() => {
|
|
289
|
-
this.$emit('onClose')
|
|
290
|
-
})
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
</script>
|
|
295
|
-
<style lang="scss" scoped>
|
|
296
|
-
// .drawer-form {
|
|
297
|
-
// padding: 10px;
|
|
298
|
-
// }
|
|
299
|
-
:deep(.el-collapse-item__content) {
|
|
300
|
-
padding: 0 10px;
|
|
301
|
-
}
|
|
302
|
-
:deep(.el-collapse-item__header) {
|
|
303
|
-
padding-left: 10px;
|
|
304
|
-
font-weight: bold;
|
|
305
|
-
}
|
|
306
|
-
</style>
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<lw-form-mini ref="dataFormRef"
|
|
3
|
-
:config="config"
|
|
4
|
-
v-model="dataForm">
|
|
5
|
-
<template #capabilityIdSelect>
|
|
6
|
-
<el-select v-model="dataForm.capabilityId"
|
|
7
|
-
filterable
|
|
8
|
-
allow-create
|
|
9
|
-
@change="showContent"
|
|
10
|
-
placeholder="请选择">
|
|
11
|
-
<el-option v-for="item in communicates"
|
|
12
|
-
:key="item.value"
|
|
13
|
-
:label="item.label"
|
|
14
|
-
:value="item.value" />
|
|
15
|
-
</el-select>
|
|
16
|
-
</template>
|
|
17
|
-
<template #content>
|
|
18
|
-
<span class="sms-content">
|
|
19
|
-
{{ content }}
|
|
20
|
-
</span>
|
|
21
|
-
</template>
|
|
22
|
-
|
|
23
|
-
<span></span>
|
|
24
|
-
</lw-form-mini>
|
|
25
|
-
</template>
|
|
26
|
-
|
|
27
|
-
<script>
|
|
28
|
-
export default {
|
|
29
|
-
name: 'basicSettings',
|
|
30
|
-
data() {
|
|
31
|
-
return {
|
|
32
|
-
dataForm: {},
|
|
33
|
-
communicates: [],
|
|
34
|
-
content: ''
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
props: {
|
|
38
|
-
modelValue: {
|
|
39
|
-
type: Object,
|
|
40
|
-
default: () => {
|
|
41
|
-
return {}
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
config: {
|
|
45
|
-
type: Object,
|
|
46
|
-
default: () => ({}),
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
watch: {
|
|
50
|
-
modelValue: {
|
|
51
|
-
handler(val) {
|
|
52
|
-
if (val) {
|
|
53
|
-
this.dataForm = val
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
},
|
|
57
|
-
immediate: true,
|
|
58
|
-
deep: true
|
|
59
|
-
},
|
|
60
|
-
dataForm: {
|
|
61
|
-
handler(val, old) {
|
|
62
|
-
if (Object.keys(old).length > 0) {
|
|
63
|
-
this.$emit('update:modelValue', val)
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
},
|
|
67
|
-
deep: true
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
methods: {
|
|
72
|
-
async getCommunicate() {
|
|
73
|
-
const params = { fields: "name,budgetSetting", expression: "" };
|
|
74
|
-
params.expression = "type eq sms AND status eq ENABLED";
|
|
75
|
-
let list = await this.$http.get(`/api/ma-manage/{tenantId}/{buCode}/communicate/list`, params)
|
|
76
|
-
|
|
77
|
-
list = list.map((item) => ({
|
|
78
|
-
value: item.id,
|
|
79
|
-
label: item.name
|
|
80
|
-
}))
|
|
81
|
-
// 全局化选项内容 用于回显数据
|
|
82
|
-
this.$store.state[`lwFlow_sms`]['capabilityId'] = list
|
|
83
|
-
this.communicates = list
|
|
84
|
-
},
|
|
85
|
-
async showContent(capabilityId) {
|
|
86
|
-
if (capabilityId) {
|
|
87
|
-
const communicate = await this.$http.get(`/api/ma-manage/{tenantId}/{buCode}/communicate/${capabilityId}`);
|
|
88
|
-
this.content = communicate.setting.template;
|
|
89
|
-
this.dataForm.budgetSetting.budgetValue = communicate.budget;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
mounted() {
|
|
94
|
-
this.getCommunicate()
|
|
95
|
-
if (this.dataForm.capabilityId) {
|
|
96
|
-
this.showContent(this.dataForm.capabilityId)
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
</script>
|
|
102
|
-
|
|
103
|
-
<style lang="scss" scoped>
|
|
104
|
-
.sms-content {
|
|
105
|
-
color: #b3b3b3;
|
|
106
|
-
}
|
|
107
|
-
</style>
|
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<lw-form-mini ref="dataFormRef"
|
|
3
|
-
:config="config"
|
|
4
|
-
v-model="dataForm">
|
|
5
|
-
<template #fontStyle>
|
|
6
|
-
<el-button size="small"
|
|
7
|
-
:type="dataForm.fontWeight === 'bold'? 'primary' : ''"
|
|
8
|
-
@click="changeFontWeight">B</el-button>
|
|
9
|
-
<el-button size="small"
|
|
10
|
-
:type="dataForm.textDecoration === 'underline'? 'primary' : ''"
|
|
11
|
-
@click="changeTextDecoration">U</el-button>
|
|
12
|
-
<el-button size="small"
|
|
13
|
-
:type="dataForm.fontStyle === 'italic'? 'primary' : ''"
|
|
14
|
-
@click="changeFontStyle">I</el-button>
|
|
15
|
-
</template>
|
|
16
|
-
<span></span>
|
|
17
|
-
</lw-form-mini>
|
|
18
|
-
|
|
19
|
-
</template>
|
|
20
|
-
|
|
21
|
-
<script>
|
|
22
|
-
export default {
|
|
23
|
-
name: 'styleSettings',
|
|
24
|
-
data() {
|
|
25
|
-
return {
|
|
26
|
-
dataForm: {}
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
props: {
|
|
30
|
-
modelValue: {
|
|
31
|
-
type: Object,
|
|
32
|
-
default: () => {
|
|
33
|
-
return {}
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
lf: {
|
|
37
|
-
type: Object,
|
|
38
|
-
default: () => { }
|
|
39
|
-
},
|
|
40
|
-
id: {
|
|
41
|
-
type: String,
|
|
42
|
-
default: ''
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
watch: {
|
|
46
|
-
modelValue: {
|
|
47
|
-
handler(val) {
|
|
48
|
-
this.dataForm = val
|
|
49
|
-
},
|
|
50
|
-
deep: true
|
|
51
|
-
},
|
|
52
|
-
dataForm: {
|
|
53
|
-
handler(val) {
|
|
54
|
-
if (this.id) {
|
|
55
|
-
// 自动同步样式调整
|
|
56
|
-
this.lf.setProperties(this.id, {
|
|
57
|
-
style: val
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
this.$emit('update:modelValue', val)
|
|
62
|
-
},
|
|
63
|
-
deep: true
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
computed: {
|
|
67
|
-
config() {
|
|
68
|
-
return {
|
|
69
|
-
labelWidth: '70px',
|
|
70
|
-
labelPosition: 'right',
|
|
71
|
-
size: 'default',
|
|
72
|
-
formItems: [
|
|
73
|
-
{
|
|
74
|
-
label: '背景色',
|
|
75
|
-
name: 'backgroundColor',
|
|
76
|
-
value: '',
|
|
77
|
-
component: 'color',
|
|
78
|
-
span: 12
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
label: '线条样式',
|
|
82
|
-
name: 'borderStyle',
|
|
83
|
-
value: '',
|
|
84
|
-
component: 'select',
|
|
85
|
-
options: {
|
|
86
|
-
placeholder: '请选择',
|
|
87
|
-
items: [
|
|
88
|
-
{
|
|
89
|
-
label: '实线 ─────────────',
|
|
90
|
-
value: 'solid'
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
label: '虚线 ---------------------',
|
|
94
|
-
value: 'dashed'
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
label: '点线 ·······································',
|
|
98
|
-
value: 'dotted'
|
|
99
|
-
}
|
|
100
|
-
]
|
|
101
|
-
},
|
|
102
|
-
span: 24
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
label: '线条颜色',
|
|
106
|
-
name: 'borderColor',
|
|
107
|
-
value: '',
|
|
108
|
-
component: 'color',
|
|
109
|
-
span: 8
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
label: '线条宽度',
|
|
113
|
-
name: 'borderWidth',
|
|
114
|
-
value: 2,
|
|
115
|
-
component: 'number',
|
|
116
|
-
options: {
|
|
117
|
-
placeholder: '请选择',
|
|
118
|
-
min: 1
|
|
119
|
-
},
|
|
120
|
-
span: 16
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
label: '文字颜色',
|
|
124
|
-
name: 'fontColor',
|
|
125
|
-
value: '',
|
|
126
|
-
component: 'color',
|
|
127
|
-
span: 8
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
label: '文本大小',
|
|
131
|
-
name: 'fontSize',
|
|
132
|
-
value: '',
|
|
133
|
-
component: 'number',
|
|
134
|
-
options: {
|
|
135
|
-
placeholder: '请选择',
|
|
136
|
-
min: 12,
|
|
137
|
-
suffix: 'px'
|
|
138
|
-
},
|
|
139
|
-
span: 16
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
label: '字体',
|
|
143
|
-
name: 'fontFamily',
|
|
144
|
-
value: '',
|
|
145
|
-
component: 'select',
|
|
146
|
-
options: {
|
|
147
|
-
placeholder: '请选择',
|
|
148
|
-
items: [
|
|
149
|
-
{
|
|
150
|
-
label: '微软雅黑',
|
|
151
|
-
value: 'Microsoft YaHei'
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
label: '宋体',
|
|
155
|
-
value: 'SimSun'
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
label: '黑体',
|
|
159
|
-
value: 'SimHei'
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
label: '楷体',
|
|
163
|
-
value: 'KaiTi'
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
label: '隶书',
|
|
167
|
-
value: 'LiSu'
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
label: '幼圆',
|
|
171
|
-
value: 'YouYuan'
|
|
172
|
-
}
|
|
173
|
-
]
|
|
174
|
-
},
|
|
175
|
-
span: 24
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
label: '行高',
|
|
179
|
-
name: 'lineHeight',
|
|
180
|
-
value: 1,
|
|
181
|
-
component: 'number',
|
|
182
|
-
options: {
|
|
183
|
-
placeholder: '请选择',
|
|
184
|
-
min: 1,
|
|
185
|
-
step: 0.1
|
|
186
|
-
},
|
|
187
|
-
span: 16
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
label: '对齐',
|
|
191
|
-
name: 'textAlign',
|
|
192
|
-
value: '',
|
|
193
|
-
component: 'select',
|
|
194
|
-
options: {
|
|
195
|
-
placeholder: '请选择',
|
|
196
|
-
items: [
|
|
197
|
-
{
|
|
198
|
-
label: '左对齐',
|
|
199
|
-
value: 'left'
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
label: '居中',
|
|
203
|
-
value: 'center'
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
label: '右对齐',
|
|
207
|
-
value: 'right'
|
|
208
|
-
}
|
|
209
|
-
]
|
|
210
|
-
},
|
|
211
|
-
span: 24
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
label: '文本样式',
|
|
215
|
-
component: 'fontStyle',
|
|
216
|
-
span: 24
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
]
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
},
|
|
223
|
-
methods: {
|
|
224
|
-
changeFontWeight() {
|
|
225
|
-
this.dataForm.fontWeight = this.dataForm.fontWeight === 'bold' ? 'normal' : 'bold'
|
|
226
|
-
},
|
|
227
|
-
changeTextDecoration() {
|
|
228
|
-
this.dataForm.textDecoration = this.dataForm.textDecoration === 'underline' ? 'none' : 'underline'
|
|
229
|
-
},
|
|
230
|
-
changeFontStyle() {
|
|
231
|
-
this.dataForm.fontStyle = this.dataForm.fontStyle === 'italic' ? 'normal' : 'italic'
|
|
232
|
-
},
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
</script>
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
export default function registerStart(lf) {
|
|
2
|
-
lf.register('end', ({ HtmlNode, HtmlNodeModel, h }) => {
|
|
3
|
-
class HtmlNodeView extends HtmlNode {
|
|
4
|
-
setHtml(rootEl) {
|
|
5
|
-
const { properties, text } = this.props.model
|
|
6
|
-
|
|
7
|
-
const el = document.createElement('div')
|
|
8
|
-
el.className = 'lw-flow-node-end'
|
|
9
|
-
// 设置样式
|
|
10
|
-
el.style.backgroundColor = properties?.style?.backgroundColor || ''
|
|
11
|
-
el.style.borderStyle = properties?.style?.borderStyle || 'solid'
|
|
12
|
-
el.style.borderColor = properties?.style?.borderColor || ''
|
|
13
|
-
el.style.borderWidth = `${properties?.style?.borderWidth || 2}px`
|
|
14
|
-
el.style.color = properties?.style?.fontColor || '' // 使用 color 替代 font-color
|
|
15
|
-
el.style.fontSize = `${properties?.style?.fontSize || 14}px` // 默认字体大小为 12px
|
|
16
|
-
el.style.fontFamily = properties?.style?.fontFamily || 'Microsoft YaHei' // 添加默认字体
|
|
17
|
-
el.style.lineHeight = properties?.style?.lineHeight || '1'
|
|
18
|
-
el.style.fontWeight = properties?.style?.fontWeight || ''
|
|
19
|
-
el.style.justifyContent = properties?.style?.textAlign || ''
|
|
20
|
-
el.style.textDecoration = properties?.style?.textDecoration || ''
|
|
21
|
-
el.style.fontStyle = properties?.style?.fontStyle || ''
|
|
22
|
-
const html = `<span>${properties?.data?.name || '结束'}</span>`
|
|
23
|
-
el.innerHTML = html
|
|
24
|
-
rootEl.innerHTML = ''
|
|
25
|
-
rootEl.appendChild(el)
|
|
26
|
-
window.stop = (ev) => {
|
|
27
|
-
ev.stopPropagation()
|
|
28
|
-
}
|
|
29
|
-
window.setData = () => {
|
|
30
|
-
const { graphModel, model } = this.props
|
|
31
|
-
graphModel.eventCenter.emit('custom:button-click', model)
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
class HtmlNodeModelAttributes extends HtmlNodeModel {
|
|
36
|
-
setAttributes() {
|
|
37
|
-
this.width = 100
|
|
38
|
-
this.height = 40
|
|
39
|
-
this.text.editable = false
|
|
40
|
-
}
|
|
41
|
-
getConnectedSourceRules() {
|
|
42
|
-
const rules = super.getConnectedSourceRules()
|
|
43
|
-
const notAsTarget = {
|
|
44
|
-
message: '终止节点不能作为连线的起点',
|
|
45
|
-
validate: () => false
|
|
46
|
-
}
|
|
47
|
-
rules.push(notAsTarget)
|
|
48
|
-
return rules
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
return {
|
|
52
|
-
view: HtmlNodeView,
|
|
53
|
-
model: HtmlNodeModelAttributes
|
|
54
|
-
}
|
|
55
|
-
})
|
|
56
|
-
}
|