Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-dml
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-dml
Commits
5184399c
提交
5184399c
authored
6月 24, 2024
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bug fixes
上级
649328db
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
88 行增加
和
55 行删除
+88
-55
ConfigTemplate.vue
src/components/flow/components/ConfigTemplate.vue
+3
-11
ConfigViewTemplate.vue
src/components/flow/components/ConfigViewTemplate.vue
+2
-4
Config.vue
...components/conditionalBranch/attributeJudgment/Config.vue
+39
-18
Config.vue
...flow/components/conditionalBranch/timeJudgment/Config.vue
+2
-7
Config.vue
...ow/components/triggeringConditions/changeProps/Config.vue
+38
-11
dictionary.ts
src/utils/dictionary.ts
+4
-4
没有找到文件。
src/components/flow/components/ConfigTemplate.vue
浏览文件 @
5184399c
...
...
@@ -56,7 +56,7 @@ function updateNode() {
</
script
>
<
template
>
<el-dialog
title=
"设置组件"
append-to-body
width=
"
6
00px"
>
<el-dialog
title=
"设置组件"
append-to-body
width=
"
8
00px"
>
<el-form
ref=
"formRef"
:model=
"form"
:rules=
"rules"
label-suffix=
":"
>
<!-- 学生设置组件 -->
<template
v-if=
"role === 'student'"
>
...
...
@@ -102,19 +102,11 @@ function updateNode() {
<!--
<el-button
plain
auto-insert-space
@
click=
"$emit('update:modelValue', false)"
>
关闭
</el-button>
-->
<el-button
@
click=
"step--"
plain
auto-insert-space
v-if=
"step >= 1"
>
上一步
</el-button>
<el-button
@
click=
"step++"
plain
auto-insert-space
v-if=
"step
<
stepNum
"
>
下一步
</el-button>
<el-button
type=
"primary"
auto-insert-space
@
click=
"submit().then(() => $emit('update:modelValue', false))"
v-if=
"step === stepNum"
>
保存
</el-button
>
<el-button
type=
"primary"
auto-insert-space
@
click=
"submit().then(() => $emit('update:modelValue', false))"
v-if=
"step === stepNum"
>
保存
</el-button>
</el-row>
<el-row
justify=
"center"
v-else
>
<el-button
plain
auto-insert-space
@
click=
"$emit('update:modelValue', false)"
>
关闭
</el-button>
<el-button
type=
"primary"
auto-insert-space
@
click=
"submit().then(() => $emit('update:modelValue', false))"
>
保存
</el-button
>
<el-button
type=
"primary"
auto-insert-space
@
click=
"submit().then(() => $emit('update:modelValue', false))"
>
保存
</el-button>
</el-row>
</
template
>
</el-dialog>
...
...
src/components/flow/components/ConfigViewTemplate.vue
浏览文件 @
5184399c
...
...
@@ -38,7 +38,7 @@ function updateNode() {
</
script
>
<
template
>
<el-dialog
title=
"组件配置"
append-to-body
width=
"
6
00px"
>
<el-dialog
title=
"组件配置"
append-to-body
width=
"
8
00px"
>
<el-form
ref=
"formRef"
:model=
"form"
:rules=
"rules"
label-suffix=
":"
>
<el-row
justify=
"space-between"
>
<el-form-item
label=
"组件类型"
>
{{
node
.
data
.
type_name
}}
</el-form-item>
...
...
@@ -67,9 +67,7 @@ function updateNode() {
<
template
#
footer
>
<el-row
justify=
"center"
>
<el-button
plain
auto-insert-space
@
click=
"$emit('update:modelValue', false)"
>
关闭
</el-button>
<el-button
type=
"primary"
auto-insert-space
@
click=
"submit"
v-if=
"role === 'teacher' && templateType === '2'"
>
保存
</el-button
>
<el-button
type=
"primary"
auto-insert-space
@
click=
"submit"
v-if=
"role === 'teacher' && templateType === '2'"
>
保存
</el-button>
</el-row>
</
template
>
</el-dialog>
...
...
src/components/flow/components/conditionalBranch/attributeJudgment/Config.vue
浏览文件 @
5184399c
...
...
@@ -8,7 +8,7 @@ const props = defineProps<{ node: any }>()
const
role
=
inject
(
'role'
)
as
string
const
form
=
reactive
({
const
form
:
any
=
reactive
({
rules
:
[{
attr_id
:
''
,
attr_type
:
''
,
operate
:
''
,
value
:
''
}]
})
watchEffect
(()
=>
{
...
...
@@ -43,6 +43,15 @@ function removeRule(index: number) {
function
getAttr
(
attrId
:
string
)
{
return
userAttrList
.
value
.
find
(
item
=>
item
.
id
===
attrId
)
}
// 条件改变
function
handleOperateChange
(
value
:
string
,
item
:
any
)
{
item
.
value
=
''
// 区间
if
(
value
===
'range'
)
{
item
.
value
=
{
start
:
undefined
,
end
:
undefined
}
}
}
</
script
>
<
template
>
...
...
@@ -52,27 +61,39 @@ function getAttr(attrId: string) {
<el-select
v-model=
"rule.attr_id"
@
change=
"onAttrChange(rule)"
placeholder=
"请选择属性"
style=
"width: 120px"
>
<el-option
:key=
"item.id"
v-for=
"item in userAttrList"
:value=
"item.id"
:label=
"item.name"
></el-option>
</el-select>
<el-select
v-model=
"rule.operate"
style=
"margin: 0 10px; width: 120px"
>
<el-option
v-for=
"item in getOperatorList(rule.attr_type)"
:key=
"item.value"
:value=
"item.value"
:label=
"item.label"
></el-option>
<el-select
v-model=
"rule.operate"
style=
"margin: 0 10px; width: 120px"
@
change=
"value => handleOperateChange(value, rule)"
>
<el-option
v-for=
"item in getOperatorList(rule.attr_type)"
:key=
"item.value"
:value=
"item.value"
:label=
"item.label"
></el-option>
</el-select>
<el-input
v-model=
"rule.value"
placeholder=
"请输入属性值"
:maxlength=
"getAttr(rule.attr_id)?.format"
style=
"width: 180px"
></el-input>
<el-form-item
v-if=
"!['null', 'not null'].includes(rule.operate)"
>
<!-- 数字区间 -->
<template
v-if=
"['2', '3'].includes(rule.attr_type) && rule.operate === 'range'"
>
<el-input-number
step-strictly
:controls=
"false"
:min=
"0"
v-model=
"rule.value.start"
/>
<el-input-number
step-strictly
:controls=
"false"
:min=
"0"
v-model=
"rule.value.end"
style=
"margin-left: 10px"
/>
</
template
>
<!-- 日期区间 -->
<
template
v-else-if=
"rule.attr_type === '4' && rule.operate === 'range'"
>
<el-date-picker
v-model=
"rule.value.start"
type=
"date"
value-format=
"YYYY-MM-DD"
style=
"width: 180px"
/>
<el-date-picker
v-model=
"rule.value.end"
type=
"date"
value-format=
"YYYY-MM-DD"
style=
"width: 180px; margin-left: 10px"
/>
</
template
>
<!-- 时间区间 -->
<
template
v-else-if=
"rule.attr_type === '5' && rule.operate === 'range'"
>
<el-date-picker
v-model=
"rule.value.start"
type=
"datetime"
value-format=
"YYYY-MM-DD HH:mm:ss"
style=
"width: 180px"
/>
<el-date-picker
v-model=
"rule.value.end"
type=
"datetime"
value-format=
"YYYY-MM-DD HH:mm:ss"
style=
"width: 180px; margin-left: 10px"
/>
</
template
>
<
template
v-else-if=
"rule.attr_type === '4' && (rule.operate === 'after' || rule.operate === 'before')"
>
<el-date-picker
v-model=
"rule.value"
type=
"date"
value-format=
"YYYY-MM-DD"
/>
</
template
>
<
template
v-else-if=
"rule.attr_type === '5' && (rule.operate === 'after' || rule.operate === 'before')"
>
<el-date-picker
v-model=
"rule.value"
type=
"datetime"
value-format=
"YYYY-MM-DD HH:mm:ss"
style=
"width: 180px; margin-left: 10px"
/>
</
template
>
<
template
v-else
>
<el-input
v-model=
"rule.value"
placeholder=
"请输入属性值"
:maxlength=
"getAttr(rule.attr_id)?.format"
style=
"width: 180px"
></el-input>
</
template
>
</el-form-item>
<el-icon
style=
"margin-left: 10px"
size=
"20"
color=
"#cf5b78"
@
click=
"removeRule(index)"
v-if=
"index !== 0"
>
<RemoveFilled
/>
</el-icon>
<el-icon
style=
"margin-left: 10px"
size=
"20"
color=
"#cf5b78"
@
click=
"addRule"
v-if=
"index === form.rules.length - 1"
>
<el-icon
style=
"margin-left: 10px"
size=
"20"
color=
"#cf5b78"
@
click=
"addRule"
v-if=
"index === form.rules.length - 1"
>
<CirclePlusFilled
/>
</el-icon>
</el-row>
...
...
src/components/flow/components/conditionalBranch/timeJudgment/Config.vue
浏览文件 @
5184399c
...
...
@@ -52,12 +52,7 @@ watchEffect(() => {
<el-select
v-model=
"form.date_rule"
placeholder=
"请选择"
style=
"width: 115px; margin-right: 10px"
>
<el-option
v-for=
"item in dateRuleList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
<el-date-picker
v-if=
"['0', '1'].includes(form.date_rule)"
v-model=
"form.date"
type=
"date"
placeholder=
"请选择"
value-format=
"YYYY-MM-DD"
/>
<el-date-picker
v-if=
"['0', '1'].includes(form.date_rule)"
v-model=
"form.date"
type=
"date"
placeholder=
"请选择"
value-format=
"YYYY-MM-DD"
/>
<el-date-picker
v-else
v-model=
"form.date"
...
...
@@ -69,7 +64,7 @@ watchEffect(() => {
</
template
>
<
template
v-else
>
<el-checkbox-group
v-model=
"form.week"
>
<el-checkbox
v-for=
"item in weekList"
:key=
"item"
:value=
"item"
/>
<el-checkbox
v-for=
"item in weekList"
:key=
"item"
:
label=
"item"
:
value=
"item"
/>
</el-checkbox-group>
</
template
>
</el-form-item>
...
...
src/components/flow/components/triggeringConditions/changeProps/Config.vue
浏览文件 @
5184399c
...
...
@@ -9,6 +9,7 @@ const role = inject('role') as string
const
form
=
reactive
({
attr_id
:
''
,
attr_type
:
''
,
operate
:
''
,
value
:
''
})
...
...
@@ -32,6 +33,8 @@ const operatorList = computed(() => {
})
function
onAttrChange
()
{
const
currentUserAttr
=
userAttrList
.
value
.
find
(
item
=>
item
.
id
===
form
.
attr_id
)
form
.
attr_type
=
currentUserAttr
?
currentUserAttr
.
type
:
''
form
.
operate
=
''
form
.
value
=
''
}
...
...
@@ -39,6 +42,15 @@ function onAttrChange() {
function
getAttr
(
attrId
:
string
)
{
return
userAttrList
.
value
.
find
(
item
=>
item
.
id
===
attrId
)
}
// 条件改变
function
handleOperateChange
(
value
:
string
)
{
form
.
value
=
''
// 区间
if
(
value
===
'range'
)
{
form
.
value
=
{
start
:
undefined
,
end
:
undefined
}
}
}
</
script
>
<
template
>
...
...
@@ -49,18 +61,33 @@ function getAttr(attrId: string) {
<el-select
v-model=
"form.attr_id"
@
change=
"onAttrChange"
placeholder=
"请选择属性"
style=
"width: 130px"
>
<el-option
:key=
"item.id"
v-for=
"item in userAttrList"
:value=
"item.id"
:label=
"item.name"
></el-option>
</el-select>
<el-select
v-model=
"form.operate"
style=
"margin: 0 10px; width: 130px"
>
<el-option
v-for=
"item in operatorList"
:key=
"item.value"
:value=
"item.value"
:label=
"item.label"
></el-option>
<el-select
v-model=
"form.operate"
style=
"margin: 0 10px; width: 130px"
@
change=
"handleOperateChange"
>
<el-option
v-for=
"item in operatorList"
:key=
"item.value"
:value=
"item.value"
:label=
"item.label"
></el-option>
</el-select>
<el-input
v-model=
"form.value"
placeholder=
"请输入"
:maxlength=
"getAttr(form.attr_id)?.format"
style=
"width: 200px"
></el-input>
<!-- 数字区间 -->
<template
v-if=
"['2', '3'].includes(form.attr_type) && form.operate === 'range'"
>
<el-input-number
step-strictly
:controls=
"false"
:min=
"0"
v-model=
"form.value.start"
/>
<el-input-number
step-strictly
:controls=
"false"
:min=
"0"
v-model=
"form.value.end"
style=
"margin-left: 10px"
/>
</
template
>
<!-- 日期区间 -->
<
template
v-else-if=
"form.attr_type === '4' && form.operate === 'range'"
>
<el-date-picker
v-model=
"form.value.start"
type=
"date"
value-format=
"YYYY-MM-DD"
style=
"width: 180px"
/>
<el-date-picker
v-model=
"form.value.end"
type=
"date"
value-format=
"YYYY-MM-DD"
style=
"width: 180px; margin-left: 10px"
/>
</
template
>
<!-- 时间区间 -->
<
template
v-else-if=
"form.attr_type === '5' && form.operate === 'range'"
>
<el-date-picker
v-model=
"form.value.start"
type=
"datetime"
value-format=
"YYYY-MM-DD HH:mm:ss"
style=
"width: 180px"
/>
<el-date-picker
v-model=
"form.value.end"
type=
"datetime"
value-format=
"YYYY-MM-DD HH:mm:ss"
style=
"width: 180px; margin-left: 10px"
/>
</
template
>
<
template
v-else-if=
"form.attr_type === '4' && (form.operate === 'after' || form.operate === 'before')"
>
<el-date-picker
v-model=
"form.value"
type=
"date"
value-format=
"YYYY-MM-DD"
/>
</
template
>
<
template
v-else-if=
"form.attr_type === '5' && (form.operate === 'after' || form.operate === 'before')"
>
<el-date-picker
v-model=
"form.value"
type=
"datetime"
value-format=
"YYYY-MM-DD HH:mm:ss"
style=
"width: 180px; margin-left: 10px"
/>
</
template
>
<
template
v-else
>
<el-input
v-model=
"form.value"
placeholder=
"请输入属性值"
:maxlength=
"getAttr(form.attr_id)?.format"
style=
"width: 180px"
></el-input>
</
template
>
</div>
<p
style=
"font-size: 12px; text-align: right; color: #ccc"
>
所选择属性满足该条件的用户,将会触发该旅程
</p>
</div>
...
...
src/utils/dictionary.ts
浏览文件 @
5184399c
...
...
@@ -83,10 +83,10 @@ export const numberOperatorList: OperatorType[] = [
export
const
dateOperatorList
:
OperatorType
[]
=
[
{
label
:
'绝对时间之前'
,
value
:
'before'
},
{
label
:
'绝对时间之后'
,
value
:
'after'
},
{
label
:
'绝对时间区间'
,
value
:
'range'
}
,
{
label
:
'相对过去天数'
,
value
:
'relative_past_day'
},
{
label
:
'相对当前天数'
,
value
:
'relative_current_day'
},
{
label
:
'在...天内'
,
value
:
'in_day'
}
{
label
:
'绝对时间区间'
,
value
:
'range'
}
//
{ label: '相对过去天数', value: 'relative_past_day' },
//
{ label: '相对当前天数', value: 'relative_current_day' },
//
{ label: '在...天内', value: 'in_day' }
]
export
const
happenInfoList
=
[
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论