Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-dml
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-dml
Commits
2c912887
提交
2c912887
authored
7月 02, 2024
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: 修改RFM
上级
eb8297d4
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
29 行增加
和
6 行删除
+29
-6
RFMRuleItem.vue
src/components/rule/RFMRuleItem.vue
+27
-4
useRFMData.ts
src/composables/useRFMData.ts
+1
-1
LabelRuleDialog.vue
src/modules/label/components/LabelRuleDialog.vue
+1
-1
没有找到文件。
src/components/rule/RFMRuleItem.vue
浏览文件 @
2c912887
...
...
@@ -26,7 +26,18 @@ const defaultScore = [
]
onMounted
(()
=>
{
form
.
value
=
Object
.
assign
({
basis
:
'1'
,
rule
:
'101'
,
event_id
:
'-1'
,
attr_id
:
''
,
attr_type
:
''
,
config
:
[...
defaultScore
]
},
form
.
value
)
form
.
value
=
Object
.
assign
(
{
basis
:
'1'
,
rule
:
'101'
,
event_id
:
'-1'
,
attr_id
:
''
,
attr_type
:
''
,
config
:
[...
defaultScore
],
extend_config
:
{
default_score_config
:
{
switch
:
false
,
score
:
undefined
}
}
},
form
.
value
)
})
const
{
userAttrList
,
fetchUserAttrList
}
=
useUserAttr
()
...
...
@@ -111,6 +122,8 @@ const a = [
{
id
:
'004'
,
label
:
'2200'
},
{
id
:
'005'
,
label
:
'1800'
}
]
const
defaultOptions
=
Array
.
from
({
length
:
5
}).
map
((
_
,
index
)
=>
({
value
:
index
+
1
,
label
:
index
+
1
}))
</
script
>
<
template
>
...
...
@@ -169,9 +182,15 @@ const a = [
<el-select
v-model=
"form.attr_id"
placeholder=
"选择属性"
style=
"width: 160px"
@
change=
"handleAttrChange"
v-else
>
<el-option
v-for=
"item in userAttrList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
<
template
v-if=
"form.basis == 1 && form.rule != '102' && form.attr_id"
>
<p>
最小值:
{{
userAttrRange
.
min
}}
<br
/>
最大值:
{{
userAttrRange
.
max
}}
<br
/>
平均值:
{{
userAttrRange
.
avg
}}
</p>
</
template
>
<div
style=
"flex: 1; display: flex; justify-content: space-between"
v-if=
"form.basis == 1 && form.rule != '102' && form.attr_id"
>
<p>
最小值:{{ userAttrRange.min }}
<br
/>
最大值:{{ userAttrRange.max }}
</p>
<p>
平均值:{{ userAttrRange.avg }}
<br
/>
中位值:{{ userAttrRange.median }}
</p>
</div>
</div>
<div
class=
"rfm-header-extra"
v-if=
"form.rule === '101'"
>
<p>
未匹配数据默认赋值
</p>
<el-select-v2
v-model=
"form.extend_config.default_score_config.score"
:options=
"defaultOptions"
style=
"width: 100px; margin: 0 10px"
clearable
/>
<el-switch
v-model=
"form.extend_config.default_score_config.switch"
></el-switch>
</div>
<div
class=
"rfm-body"
>
<
template
v-if=
"form.rule === '102'"
>
...
...
@@ -254,4 +273,8 @@ const a = [
margin
:
10px
0
;
}
}
.rfm-header-extra
{
display
:
flex
;
align-items
:
center
;
}
</
style
>
src/composables/useRFMData.ts
浏览文件 @
2c912887
...
...
@@ -41,7 +41,7 @@ export function useMetaEvent() {
// 最大值最小值
export
function
useUserAttrRange
()
{
const
userAttrRange
=
ref
<
{
min
:
string
;
max
:
string
;
avg
:
string
}
>
({
min
:
''
,
max
:
''
,
avg
:
''
})
const
userAttrRange
=
ref
<
{
min
:
string
;
max
:
string
;
avg
:
string
;
median
:
string
}
>
({
min
:
''
,
max
:
''
,
avg
:
''
,
median
:
''
})
async
function
fetchUserAttrRange
(
member_meta_id
:
string
)
{
await
getMemberAttrRange
({
member_meta_id
}).
then
((
res
:
any
)
=>
{
userAttrRange
.
value
=
res
.
data
.
detail
...
...
src/modules/label/components/LabelRuleDialog.vue
浏览文件 @
2c912887
...
...
@@ -115,7 +115,7 @@ function handleUpdate() {
</
script
>
<
template
>
<el-dialog
title=
"标签规则管理"
:close-on-click-modal=
"false"
width=
"
98
0px"
@
update:modelValue=
"value => $emit('update:modelValue', value)"
>
<el-dialog
title=
"标签规则管理"
:close-on-click-modal=
"false"
width=
"
100
0px"
@
update:modelValue=
"value => $emit('update:modelValue', value)"
>
<el-form
label-suffix=
":"
label-width=
"82px"
>
<el-row>
<el-col
:span=
"12"
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论