lw-cdp-ui 1.2.48 → 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 -469
- package/dist/components/lwLogin/index.vue +0 -511
- 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 -346
- 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 -19906
- package/dist/lw-cdp-ui.umd.js +0 -22
- package/dist/style.css +0 -1
- package/dist/vite.svg +0 -1
|
@@ -1,266 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-select ref="select"
|
|
3
|
-
v-model="defaultValue"
|
|
4
|
-
:size="size"
|
|
5
|
-
:clearable="clearable"
|
|
6
|
-
:multiple="multiple"
|
|
7
|
-
:collapse-tags="collapseTags"
|
|
8
|
-
:collapse-tags-tooltip="collapseTagsTooltip"
|
|
9
|
-
:filterable="filterable"
|
|
10
|
-
:placeholder="placeholder"
|
|
11
|
-
:disabled="disabled"
|
|
12
|
-
:filter-method="filterMethod"
|
|
13
|
-
@remove-tag="removeTag"
|
|
14
|
-
@visible-change="visibleChange"
|
|
15
|
-
@clear="clear">
|
|
16
|
-
<template #empty>
|
|
17
|
-
<div class="lw-table-select__table"
|
|
18
|
-
style="width: 100%;"
|
|
19
|
-
v-loading="loading">
|
|
20
|
-
<div class="lw-table-select__header">
|
|
21
|
-
<slot name="header"
|
|
22
|
-
:form="formData"
|
|
23
|
-
:submit="formSubmit"></slot>
|
|
24
|
-
</div>
|
|
25
|
-
<el-table ref="table"
|
|
26
|
-
:data="tableData"
|
|
27
|
-
:max-height="245"
|
|
28
|
-
:highlight-current-row="!multiple"
|
|
29
|
-
:reserve-selection="true"
|
|
30
|
-
@row-click="click"
|
|
31
|
-
@select="select"
|
|
32
|
-
@select-all="selectAll">
|
|
33
|
-
<el-table-column v-if="multiple"
|
|
34
|
-
type="selection"
|
|
35
|
-
width="45"></el-table-column>
|
|
36
|
-
<el-table-column v-else
|
|
37
|
-
type="index"
|
|
38
|
-
width="45">
|
|
39
|
-
<template
|
|
40
|
-
#default="scope"><span>{{scope.$index+(currentPage - 1) * pageSize + 1}}</span></template>
|
|
41
|
-
</el-table-column>
|
|
42
|
-
<slot></slot>
|
|
43
|
-
</el-table>
|
|
44
|
-
<div class="lw-table-select__page">
|
|
45
|
-
<el-pagination small
|
|
46
|
-
background
|
|
47
|
-
layout="prev, pager, next"
|
|
48
|
-
:total="total"
|
|
49
|
-
:page-size="pageSize"
|
|
50
|
-
v-model:currentPage="currentPage"
|
|
51
|
-
@current-change="reload"></el-pagination>
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
54
|
-
</template>
|
|
55
|
-
</el-select>
|
|
56
|
-
</template>
|
|
57
|
-
|
|
58
|
-
<script>
|
|
59
|
-
import config from "./tableSelect";
|
|
60
|
-
|
|
61
|
-
export default {
|
|
62
|
-
name: 'lwTableSelect',
|
|
63
|
-
props: {
|
|
64
|
-
modelValue: null,
|
|
65
|
-
apiObj: { type: [Object, Function], default: () => { } },
|
|
66
|
-
params: { type: Object, default: () => { } },
|
|
67
|
-
placeholder: { type: String, default: "请选择" },
|
|
68
|
-
size: { type: String, default: "default" },
|
|
69
|
-
clearable: { type: Boolean, default: false },
|
|
70
|
-
multiple: { type: Boolean, default: false },
|
|
71
|
-
filterable: { type: Boolean, default: false },
|
|
72
|
-
collapseTags: { type: Boolean, default: false },
|
|
73
|
-
collapseTagsTooltip: { type: Boolean, default: false },
|
|
74
|
-
disabled: { type: Boolean, default: false },
|
|
75
|
-
tableWidth: { type: Number, default: 400 },
|
|
76
|
-
mode: { type: String, default: "popover" },
|
|
77
|
-
// 定义什么参数就返回什么 value label 为 必须字段
|
|
78
|
-
props: { type: Object, default: () => { } }
|
|
79
|
-
},
|
|
80
|
-
data() {
|
|
81
|
-
return {
|
|
82
|
-
loading: false,
|
|
83
|
-
keyword: null,
|
|
84
|
-
defaultValue: [],
|
|
85
|
-
tableData: [],
|
|
86
|
-
pageSize: config.pageSize,
|
|
87
|
-
total: 0,
|
|
88
|
-
currentPage: 1,
|
|
89
|
-
defaultProps: {
|
|
90
|
-
label: config.props.label,
|
|
91
|
-
value: config.props.value,
|
|
92
|
-
page: config.request.page,
|
|
93
|
-
pageSize: config.request.pageSize,
|
|
94
|
-
keyword: config.request.keyword
|
|
95
|
-
},
|
|
96
|
-
formData: {}
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
computed: {
|
|
100
|
-
|
|
101
|
-
},
|
|
102
|
-
watch: {
|
|
103
|
-
modelValue: {
|
|
104
|
-
handler() {
|
|
105
|
-
this.defaultValue = this.modelValue
|
|
106
|
-
},
|
|
107
|
-
deep: true
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
mounted() {
|
|
111
|
-
this.defaultProps = Object.assign(this.defaultProps, this.props);
|
|
112
|
-
this.defaultValue = this.modelValue
|
|
113
|
-
},
|
|
114
|
-
methods: {
|
|
115
|
-
//表格显示隐藏回调
|
|
116
|
-
visibleChange(visible) {
|
|
117
|
-
if (visible) {
|
|
118
|
-
this.currentPage = 1
|
|
119
|
-
this.keyword = null
|
|
120
|
-
this.formData = {}
|
|
121
|
-
this.getData()
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
//获取表格数据
|
|
125
|
-
async getData() {
|
|
126
|
-
this.loading = true;
|
|
127
|
-
var reqData = {
|
|
128
|
-
[this.defaultProps.page]: this.currentPage - 1,
|
|
129
|
-
[this.defaultProps.pageSize]: this.pageSize,
|
|
130
|
-
[this.defaultProps.keyword]: this.keyword
|
|
131
|
-
}
|
|
132
|
-
let expression = this.$expression(this.formData)
|
|
133
|
-
if (expression && this.params?.expression) {
|
|
134
|
-
this.formData.expression = `${this.params.expression} AND ${expression}`
|
|
135
|
-
} else if (expression) {
|
|
136
|
-
this.formData.expression = expression
|
|
137
|
-
} else if (this.params?.expression) {
|
|
138
|
-
this.formData.expression = this.params?.expression
|
|
139
|
-
} else {
|
|
140
|
-
this.formData.expression = ''
|
|
141
|
-
}
|
|
142
|
-
Object.assign(reqData, this.params, this.formData)
|
|
143
|
-
|
|
144
|
-
var res = await this.apiObj(reqData);
|
|
145
|
-
var parseData = config.parseData(res)
|
|
146
|
-
this.tableData = parseData.rows;
|
|
147
|
-
this.total = parseData.total;
|
|
148
|
-
this.loading = false;
|
|
149
|
-
//表格默认赋值
|
|
150
|
-
this.$nextTick(() => {
|
|
151
|
-
if (this.multiple) {
|
|
152
|
-
this.defaultValue.forEach(row => {
|
|
153
|
-
var setrow = this.tableData.filter(item => item[this.defaultProps.value] === row['value'])
|
|
154
|
-
if (setrow.length > 0) {
|
|
155
|
-
this.$refs.table.toggleRowSelection(setrow[0], true);
|
|
156
|
-
}
|
|
157
|
-
})
|
|
158
|
-
} else {
|
|
159
|
-
var setrow = this.tableData.filter(item => item[this.defaultProps.value] === this.defaultValue?.value)
|
|
160
|
-
this.$refs.table.setCurrentRow(setrow[0]);
|
|
161
|
-
}
|
|
162
|
-
this.$refs.table.setScrollTop(0)
|
|
163
|
-
})
|
|
164
|
-
},
|
|
165
|
-
//插糟表单提交
|
|
166
|
-
formSubmit() {
|
|
167
|
-
this.currentPage = 1
|
|
168
|
-
this.keyword = null
|
|
169
|
-
this.getData()
|
|
170
|
-
},
|
|
171
|
-
//分页刷新表格
|
|
172
|
-
reload() {
|
|
173
|
-
this.getData()
|
|
174
|
-
},
|
|
175
|
-
// 处理选中值
|
|
176
|
-
getCurVlaue(row) {
|
|
177
|
-
const filteredRow = {};
|
|
178
|
-
// 遍历 this.defaultProps 中定义的字段并保留对应的值
|
|
179
|
-
Object.entries(this.defaultProps).forEach(([key, propKey]) => {
|
|
180
|
-
|
|
181
|
-
if (row[propKey]) {
|
|
182
|
-
filteredRow[key] = row[propKey]
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
});
|
|
186
|
-
return filteredRow
|
|
187
|
-
},
|
|
188
|
-
//表格勾选事件
|
|
189
|
-
select(rows, row) {
|
|
190
|
-
var isSelect = rows.length && rows.indexOf(row) !== -1
|
|
191
|
-
if (isSelect) {
|
|
192
|
-
this.defaultValue.push(this.getCurVlaue(row))
|
|
193
|
-
} else {
|
|
194
|
-
this.defaultValue.splice(this.defaultValue.findIndex(item => item['value'] == row[this.defaultProps.value]), 1)
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
},
|
|
198
|
-
//表格全选事件
|
|
199
|
-
selectAll(rows) {
|
|
200
|
-
var isAllSelect = rows.length > 0
|
|
201
|
-
if (isAllSelect) {
|
|
202
|
-
rows.forEach(row => {
|
|
203
|
-
var isHas = this.defaultValue.find(item => item['value'] == row[this.defaultProps.value])
|
|
204
|
-
if (!isHas) {
|
|
205
|
-
this.defaultValue.push(this.getCurVlaue(row))
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
})
|
|
209
|
-
} else {
|
|
210
|
-
this.defaultValue = []
|
|
211
|
-
}
|
|
212
|
-
this.$emit('update:modelValue', this.defaultValue);
|
|
213
|
-
this.$emit('change', this.defaultValue);
|
|
214
|
-
},
|
|
215
|
-
click(row) {
|
|
216
|
-
if (this.multiple) {
|
|
217
|
-
//处理多选点击行
|
|
218
|
-
} else {
|
|
219
|
-
this.defaultValue = this.getCurVlaue(row)
|
|
220
|
-
this.$refs.select.blur()
|
|
221
|
-
this.$emit('update:modelValue', this.defaultValue);
|
|
222
|
-
this.$emit('change', this.defaultValue);
|
|
223
|
-
}
|
|
224
|
-
},
|
|
225
|
-
//tags删除后回调
|
|
226
|
-
removeTag(tag) {
|
|
227
|
-
var row = this.findRowByKey(tag.value)
|
|
228
|
-
this.$refs.table.toggleRowSelection(row, false);
|
|
229
|
-
this.$emit('update:modelValue', this.defaultValue);
|
|
230
|
-
},
|
|
231
|
-
//清空后的回调
|
|
232
|
-
clear() {
|
|
233
|
-
this.$emit('update:modelValue', this.defaultValue);
|
|
234
|
-
},
|
|
235
|
-
// 关键值查询表格数据行
|
|
236
|
-
findRowByKey(value) {
|
|
237
|
-
return this.tableData.find(item => item[this.defaultProps.value] === value)
|
|
238
|
-
},
|
|
239
|
-
filterMethod(keyword) {
|
|
240
|
-
if (!keyword) {
|
|
241
|
-
this.keyword = null;
|
|
242
|
-
return false;
|
|
243
|
-
}
|
|
244
|
-
this.keyword = keyword;
|
|
245
|
-
this.getData()
|
|
246
|
-
},
|
|
247
|
-
// 触发select隐藏
|
|
248
|
-
blur() {
|
|
249
|
-
this.$refs.select.blur();
|
|
250
|
-
},
|
|
251
|
-
// 触发select显示
|
|
252
|
-
focus() {
|
|
253
|
-
this.$refs.select.focus();
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
</script>
|
|
258
|
-
|
|
259
|
-
<style scoped>
|
|
260
|
-
.lw-table-select__table {
|
|
261
|
-
padding: 12px;
|
|
262
|
-
}
|
|
263
|
-
.lw-table-select__page {
|
|
264
|
-
padding-top: 12px;
|
|
265
|
-
}
|
|
266
|
-
</style>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
//表格选择器配置
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
pageSize: 20, //表格每一页条数
|
|
5
|
-
parseData: function (res) {
|
|
6
|
-
return {
|
|
7
|
-
data: res,
|
|
8
|
-
rows: res.content, //分析行数据字段结构
|
|
9
|
-
total: res.totalElements, //分析总数字段结构
|
|
10
|
-
msg: res.message, //分析描述字段结构
|
|
11
|
-
code: res.code //分析状态字段结构
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
request: {
|
|
15
|
-
page: 'page', //规定当前分页字段
|
|
16
|
-
pageSize: 'size', //规定一页条数字段
|
|
17
|
-
keyword: 'keyword' //规定搜索字段
|
|
18
|
-
},
|
|
19
|
-
props: {
|
|
20
|
-
label: 'label', //映射label显示字段
|
|
21
|
-
value: 'value' //映射value值字段
|
|
22
|
-
}
|
|
23
|
-
}
|