提交 d963c880 authored 作者: 王鹏飞's avatar 王鹏飞

feat: 更新生成数据规则相关文本,优化用户界面

上级 6daf35c0
......@@ -145,11 +145,14 @@ function onRemove() {
justify-content: center;
font-size: 20px;
transform: translate(-50%);
background-color: #fff;
box-shadow: 2px 2px 10px 0px rgba(0, 0, 0, 0.3);
border-radius: 20px;
.el-icon {
box-sizing: content-box;
padding: 5px 8px;
cursor: pointer;
color: #606266;
}
}
.node-label {
......
......@@ -29,8 +29,8 @@ const listOptions = computed(() => {
{ label: '旅程动作', prop: 'itinerary', width: 100 },
{ label: '旅程事件', prop: 'event' },
{ label: '对应用户事件', prop: 'user_event_id', slots: 'table-event' },
{ label: '生成数据比例规则', prop: 'ratio', slots: 'table-ratio', width: 140 }
]
{ label: '生成数据比例规则', prop: 'ratio', slots: 'table-ratio', width: 140 },
],
}
})
......@@ -56,7 +56,7 @@ async function handleSubmit() {
</script>
<template>
<el-dialog title="旅程数据规则" width="900" @closed="$emit('update:modelValue', false)">
<el-dialog title="旅程数据生成规则" width="900" @closed="$emit('update:modelValue', false)">
<AppList v-bind="listOptions" ref="appList">
<template #table-event="{ row }">
<el-select v-model="row.user_event_id" :disabled="isDisabled(row.connection_type)" clearable>
......
......@@ -19,12 +19,12 @@ const listOptions = computed(() => {
return {
remote: {
httpRequest: getTripTemplateList,
params: { name: '', status: '', type: '' }
params: { name: '', status: '', type: '' },
},
filters: [
{ type: 'input', prop: 'name', placeholder: '请输入旅程模板名称' },
{ type: 'select', prop: 'type', placeholder: '请选择旅程类型', options: tripTemplateTypeList },
{ type: 'select', prop: 'status', placeholder: '请选择旅程模板状态', options: statusList }
{ type: 'select', prop: 'status', placeholder: '请选择旅程模板状态', options: statusList },
],
columns: [
{ label: '序号', type: 'index', width: 60 },
......@@ -35,14 +35,14 @@ const listOptions = computed(() => {
prop: 'type',
computed({ row }: { row: TripTemplate }) {
return getNameByValue(row.type, tripTemplateTypeList)
}
},
},
{
label: '用户旅程分值',
prop: 'score',
computed({ row }: { row: TripTemplate }) {
return parseInt(row.score)
}
},
},
{
label: '状态',
......@@ -50,12 +50,12 @@ const listOptions = computed(() => {
computed({ row }: { row: TripTemplate }) {
const color = row.status === '1' ? 'var(--main-success-color)' : 'var(--main-color)'
return `<span style="color: ${color}">${getNameByValue(row.status, statusList)}</span>`
}
},
},
{ label: '更新人', prop: 'updated_operator.real_name' },
{ label: '更新时间', prop: 'updated_time' },
{ label: '操作', slots: 'table-x', width: 360 }
]
{ label: '操作', slots: 'table-x', width: 360 },
],
}
})
......@@ -117,7 +117,7 @@ function handleRule(row: TripTemplate) {
<el-button type="primary" plain @click="handleConfig(row)">配置</el-button>
<el-button type="primary" plain @click="handleView(row)">查看</el-button>
<el-button type="primary" plain @click="handleUpdate(row)">编辑</el-button>
<el-button type="primary" plain @click="handleRule(row)">旅程数据规则</el-button>
<el-button type="primary" plain @click="handleRule(row)">数据生成规则</el-button>
</template>
</AppList>
</AppCard>
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论