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

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

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