提交 f2e20f40 authored 作者: lihuihui's avatar lihuihui

营销动作组件查看

上级 aa2fc83a
<script setup lang="ts">
import ConfigViewTemplate from '../../ConfigViewTemplate.vue'
import { useUserAttr } from '../../../useAllData'
const role = inject('role') as string
defineProps<{ node: any }>()
const { userAttrList } = useUserAttr()
</script>
<template>
<ConfigViewTemplate :node="node">
<el-form-item label="学生答案"> </el-form-item>
<el-form-item label="正确答案"> </el-form-item>
<div>
<el-form-item :label="role === 'student' ? '我的答案' : '学生答案'" style="margin-bottom: 0"></el-form-item>
<el-form-item v-for="item in node.data.student?.rules" style="margin-left: 30px">
{{ userAttrList.find(c => c.id === item.attr_id)?.name }}
=
{{ item.value }}
</el-form-item>
</div>
<div>
<el-form-item label="正确答案" style="margin-bottom: 0"></el-form-item>
<el-form-item v-for="item in node.data.teacher?.rules" style="margin-left: 30px">
{{ userAttrList.find(c => c.id === item.attr_id)?.name }}
=
{{ item.value }}
</el-form-item>
</div>
</ConfigViewTemplate>
</template>
<script setup lang="ts">
import ConfigViewTemplate from '../../ConfigViewTemplate.vue'
const role = inject('role') as string
defineProps<{ node: any }>()
const timeUnitList = [
{ label: '分钟', value: '0' },
{ label: '小时', value: '1' },
{ label: '日', value: '2' },
{ label: '周', value: '3' }
]
</script>
<template>
<ConfigViewTemplate :node="node">
<el-form-item label="学生答案"> </el-form-item>
<el-form-item label="正确答案"> </el-form-item>
<el-form-item :label="role === 'student' ? '我的答案' : '学生答案'">
<template v-if="node.data.student?.time_type === '0'">
延时{{ node.data.student?.time_num
}}{{ timeUnitList.find(item => item.value === node.data.student?.time_unit)?.label }}
</template>
<template v-if="node.data.student?.time_type === '1'"> 延时至{{ node.data.student?.time }} </template>
</el-form-item>
<el-form-item label="正确答案">
<template v-if="node.data.teacher?.time_type === '0'">
延时{{ node.data.teacher?.time_num
}}{{ timeUnitList.find(item => item.value === node.data.teacher?.time_unit)?.label }}
</template>
<template v-if="node.data.teacher?.time_type === '1'"> 延时至{{ node.data.teacher?.time }} </template>
</el-form-item>
</ConfigViewTemplate>
</template>
<script setup lang="ts">
import ConfigViewTemplate from '../../ConfigViewTemplate.vue'
import { useMaterial, useConnection } from '../../../useAllData'
import { useMapStore } from '@/stores/map'
const role = inject('role') as string
defineProps<{ node: any }>()
const operateList = [{ label: '发送消息', value: '0' }]
const getConnectionLabel = function (id: string) {
return connectionList.value.find(item => item.id === id)?.name || ''
}
const { connectionList } = useConnection()
const materialTypeList = useMapStore().getMapValuesByKey('experiment_marketing_material_type')
const { materialList } = useMaterial()
</script>
<template>
<ConfigViewTemplate :node="node">
<el-form-item label="学生答案"> </el-form-item>
<el-form-item label="正确答案"> </el-form-item>
<el-form-item :label="role === 'student' ? '我的答案' : '学生答案'">
{{ operateList.find(item => item.value === node.data.student?.operate)?.label || '' }}
{{ getConnectionLabel(node.data.student?.connection_id) }}
发送{{ materialTypeList.find(item => item.value === node.data.student?.material_type)?.label }}
{{ materialList.find(item => item.id === node.data.student?.material_id)?.name }}
</el-form-item>
<el-form-item label="正确答案">
{{ operateList.find(item => item.value === node.data.teacher?.operate)?.label || '' }}
{{ getConnectionLabel(node.data.teacher?.connection_id) }}
发送{{ materialTypeList.find(item => item.value === node.data.teacher?.material_type)?.label }}
{{ materialList.find(item => item.id === node.data.teacher?.material_id)?.name }}
</el-form-item>
</ConfigViewTemplate>
</template>
<script setup lang="ts">
import ConfigViewTemplate from '../../ConfigViewTemplate.vue'
import { useMaterial, useConnection } from '../../../useAllData'
import { useMapStore } from '@/stores/map'
const role = inject('role') as string
defineProps<{ node: any }>()
const operateList = ref([
{ label: '向用户发送文本私信', value: '0' },
{ label: '向用户发送图片私信', value: '1' },
{ label: '向用户发送视频私信', value: '2' }
])
const { connectionList } = useConnection()
const getConnectionLabel = function (id: string) {
return connectionList.value.find(item => item.id === id)?.name || ''
}
const materialTypeList = useMapStore().getMapValuesByKey('experiment_marketing_material_type')
const { materialList } = useMaterial()
</script>
<template>
<ConfigViewTemplate :node="node">
<el-form-item label="学生答案"> </el-form-item>
<el-form-item label="正确答案"> </el-form-item>
<el-form-item :label="role === 'student' ? '我的答案' : '学生答案'">
{{ operateList.find(item => item.value === node.data.student?.operate)?.label || '' }}
{{ getConnectionLabel(node.data.student?.connection_id) }}
发送{{ materialTypeList.find(item => item.value === node.data.student?.material_type)?.label }}
{{ materialList.find(item => item.id === node.data.student?.material_id)?.name }}
</el-form-item>
<el-form-item label="正确答案">
{{ operateList.find(item => item.value === node.data.teacher?.operate)?.label || '' }}
{{ getConnectionLabel(node.data.teacher?.connection_id) }}
发送{{ materialTypeList.find(item => item.value === node.data.teacher?.material_type)?.label }}
{{ materialList.find(item => item.id === node.data.teacher?.material_id)?.name }}
</el-form-item>
</ConfigViewTemplate>
</template>
<script setup lang="ts">
import ConfigViewTemplate from '../../ConfigViewTemplate.vue'
import { useMaterial, useConnection } from '../../../useAllData'
import { useMapStore } from '@/stores/map'
const role = inject('role') as string
defineProps<{ node: any }>()
const operateList = [{ label: '发送邮件', value: '0' }]
const getConnectionLabel = function (id: string) {
return connectionList.value.find(item => item.id === id)?.name || ''
}
const { connectionList } = useConnection()
const materialTypeList = useMapStore().getMapValuesByKey('experiment_marketing_material_type')
const { materialList } = useMaterial()
</script>
<template>
<ConfigViewTemplate :node="node">
<el-form-item label="学生答案"> </el-form-item>
<el-form-item label="正确答案"> </el-form-item>
<el-form-item :label="role === 'student' ? '我的答案' : '学生答案'">
{{ operateList.find(item => item.value === node.data.student?.operate)?.label || '' }}
{{ getConnectionLabel(node.data.student?.connection_id) }}
发送{{ materialTypeList.find(item => item.value === node.data.student?.material_type)?.label }}
{{ materialList.find(item => item.id === node.data.student?.material_id)?.name }}
</el-form-item>
<el-form-item label="正确答案">
{{ operateList.find(item => item.value === node.data.teacher?.operate)?.label || '' }}
{{ getConnectionLabel(node.data.teacher?.connection_id) }}
发送{{ materialTypeList.find(item => item.value === node.data.teacher?.material_type)?.label }}
{{ materialList.find(item => item.id === node.data.teacher?.material_id)?.name }}
</el-form-item>
</ConfigViewTemplate>
</template>
<script setup lang="ts">
import ConfigViewTemplate from '../../ConfigViewTemplate.vue'
const role = inject('role') as string
defineProps<{ node: any }>()
</script>
<template>
<ConfigViewTemplate :node="node">
<el-form-item label="学生答案"> </el-form-item>
<el-form-item label="正确答案"> </el-form-item>
<el-form-item :label="role === 'student' ? '我的答案' : '学生答案'">
{{ node.data.student?.message }}
</el-form-item>
<el-form-item label="正确答案">
{{ node.data.teacher?.message }}
</el-form-item>
</ConfigViewTemplate>
</template>
<script setup lang="ts">
import ConfigViewTemplate from '../../ConfigViewTemplate.vue'
import { useGroup } from '../../../useAllData'
const role = inject('role') as string
defineProps<{ node: any }>()
const { groupList } = useGroup()
</script>
<template>
<ConfigViewTemplate :node="node">
<el-form-item label="学生答案"> </el-form-item>
<el-form-item label="正确答案"> </el-form-item>
<el-form-item :label="role === 'student' ? '我的答案' : '学生答案'">
{{ groupList.find(item => item.id === node.data.student?.group_id)?.name }}
</el-form-item>
<el-form-item label="正确答案">
{{ groupList.find(item => item.id === node.data.teacher?.group_id)?.name }}
</el-form-item>
</ConfigViewTemplate>
</template>
<script setup lang="ts">
import ConfigViewTemplate from '../../ConfigViewTemplate.vue'
import { useGroup } from '../../../useAllData'
const role = inject('role') as string
defineProps<{ node: any }>()
const { groupList } = useGroup()
</script>
<template>
<ConfigViewTemplate :node="node">
<el-form-item label="学生答案"> </el-form-item>
<el-form-item label="正确答案"> </el-form-item>
<el-form-item :label="role === 'student' ? '我的答案' : '学生答案'">
{{ groupList.find(item => item.id === node.data.student?.group_id)?.name }}
</el-form-item>
<el-form-item label="正确答案">
{{ groupList.find(item => item.id === node.data.teacher?.group_id)?.name }}
</el-form-item>
</ConfigViewTemplate>
</template>
<script setup lang="ts">
import ConfigViewTemplate from '../../ConfigViewTemplate.vue'
import { useMaterial, useConnection } from '../../../useAllData'
import { useMapStore } from '@/stores/map'
const role = inject('role') as string
defineProps<{ node: any }>()
const materialTypeList = useMapStore().getMapValuesByKey('experiment_marketing_material_type')
const { materialList } = useMaterial()
const { connectionList } = useConnection()
const getConnectionLabel = function (id: string) {
return connectionList.value.find(item => item.id === id)?.name || ''
}
</script>
<template>
<ConfigViewTemplate :node="node">
<el-form-item label="学生答案"> </el-form-item>
<el-form-item label="正确答案"> </el-form-item>
<el-form-item :label="role === 'student' ? '我的答案' : '学生答案'">
发送{{ materialTypeList.find(item => item.value === node.data.student?.material_type)?.label }}
{{ materialList.find(item => item.id === node.data.student?.material_id)?.name }}
{{ getConnectionLabel(node.data.student?.connection_id) }}
</el-form-item>
<el-form-item label="正确答案">
发送{{ materialTypeList.find(item => item.value === node.data.teacher?.material_type)?.label }}
{{ materialList.find(item => item.id === node.data.teacher?.material_id)?.name }}
{{ getConnectionLabel(node.data.teacher?.connection_id) }}
</el-form-item>
</ConfigViewTemplate>
</template>
<script setup lang="ts">
import ConfigViewTemplate from '../../ConfigViewTemplate.vue'
import { useConnection } from '../../../useAllData'
const role = inject('role') as string
defineProps<{ node: any }>()
const { connectionList } = useConnection()
const operateList = [{ label: '发送消息', value: '0' }]
const getConnectionLabel = function (id: string) {
return connectionList.value.find(item => item.id === id)?.name || ''
}
</script>
<template>
<ConfigViewTemplate :node="node">
<el-form-item label="学生答案"> </el-form-item>
<el-form-item label="正确答案"> </el-form-item>
<el-form-item :label="role === 'student' ? '我的答案' : '学生答案'">
{{ operateList.find(item => item.value === node.data.student?.operate)?.label || '' }}
{{ getConnectionLabel(node.data.student?.connection_id) }}
{{ node.data.student?.message }}
</el-form-item>
<el-form-item label="正确答案">
{{ operateList.find(item => item.value === node.data.teacher?.operate)?.label || '' }}
{{ getConnectionLabel(node.data.teacher?.connection_id) }}
{{ node.data.teacher?.message }}
</el-form-item>
</ConfigViewTemplate>
</template>
<script setup lang="ts">
import ConfigViewTemplate from '../../ConfigViewTemplate.vue'
import { useMaterial, useConnection } from '../../../useAllData'
import { useMapStore } from '@/stores/map'
const role = inject('role') as string
defineProps<{ node: any }>()
const operateList = [
{ label: '发送私信', value: '0' },
{ label: '发送图片', value: '1' },
{ label: '向用户发送视频私信', value: '2' }
]
const getConnectionLabel = function (id: string) {
return connectionList.value.find(item => item.id === id)?.name || ''
}
const { connectionList } = useConnection()
const materialTypeList = useMapStore().getMapValuesByKey('experiment_marketing_material_type')
const { materialList } = useMaterial()
</script>
<template>
<ConfigViewTemplate :node="node">
<el-form-item label="学生答案"> </el-form-item>
<el-form-item label="正确答案"> </el-form-item>
<el-form-item :label="role === 'student' ? '我的答案' : '学生答案'">
{{ operateList.find(item => item.value === node.data.student?.operate)?.label || '' }}
{{ getConnectionLabel(node.data.student?.connection_id) }}
发送{{ materialTypeList.find(item => item.value === node.data.student?.material_type)?.label }}
{{ materialList.find(item => item.id === node.data.student?.material_id)?.name }}
</el-form-item>
<el-form-item label="正确答案">
{{ operateList.find(item => item.value === node.data.teacher?.operate)?.label || '' }}
{{ getConnectionLabel(node.data.teacher?.connection_id) }}
发送{{ materialTypeList.find(item => item.value === node.data.teacher?.material_type)?.label }}
{{ materialList.find(item => item.id === node.data.teacher?.material_id)?.name }}
</el-form-item>
</ConfigViewTemplate>
</template>
......@@ -96,7 +96,7 @@ function handleConfig() {
</el-row>
</el-form>
</el-card>
<TripFlow v-model="elements" action="edit" role="student" :templateType="detail?.type" :score="score">
<TripFlow v-model="elements" action="view" role="teacher" :templateType="detail?.type" :score="score">
<template #left-panel>
<TripFlowSidebar :connectionIds="connectionIds" />
</template>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论