【招生平台用户端】 新增# 线索列表接口

main
kaeery 2025-02-27 22:48:32 +08:00
parent 889efd326d
commit 8cf9f6e0ea
5 changed files with 60 additions and 16 deletions

View File

@ -0,0 +1,10 @@
import request from '@/utils/request'
// 线索详情
export function clueDetail(params?: any) {
return request.get({ url: '/clue/detail', params })
}
// 线索列表
export function clueLists(params?: any) {
return request.get({ url: '/clue/list', params })
}

View File

@ -10,3 +10,21 @@ export enum isDisabledEnum {
YES = 1, YES = 1,
NO = 0 NO = 0
} }
export enum converStatusEnum {
INTENTION = 0, //有意向
UN_RECEIVED = 1, //待领取
CONVERTED_PROCESS = 2, //转化中
ADD_RELATION = 3, //已添加
EXCEPTION = 4, //异常待处理
CONVERTED = 5, //已成交
FAILED = 6 //已战败
}
export const conversionMap = {
[converStatusEnum.INTENTION]: '有意向',
[converStatusEnum.UN_RECEIVED]: '待领取',
[converStatusEnum.CONVERTED_PROCESS]: '转化中',
[converStatusEnum.ADD_RELATION]: '已添加',
[converStatusEnum.EXCEPTION]: '异常待处理',
[converStatusEnum.CONVERTED]: '已成交',
[converStatusEnum.FAILED]: '已战败'
}

View File

@ -17,14 +17,16 @@ const loading = ref(false)
watch( watch(
() => props.modelValue, () => props.modelValue,
() => { () => {
console.log('基础信息') fetchClueDetail()
loading.value = true
setTimeout(() => {
loading.value = false
}, 500)
}, },
{ immediate: true } { immediate: true }
) )
const fetchClueDetail = () => {
loading.value = true
try {
} catch (error) {}
loading.value = false
}
const baseInfo = ref([ const baseInfo = ref([
{ {
title: '线索基本信息', title: '线索基本信息',

View File

@ -14,16 +14,16 @@
import searchForm from './modules/search-form.vue' import searchForm from './modules/search-form.vue'
import clueList from './modules/clue-list.vue' import clueList from './modules/clue-list.vue'
import clueDetail from './modules/clue-detail.vue' import clueDetail from './modules/clue-detail.vue'
import { postLists } from '@/api/org/post'
import { usePaging } from '@/hooks/usePaging' import { usePaging } from '@/hooks/usePaging'
import { clueLists } from '@/api/clue'
const queryParams = reactive({ const queryParams = reactive({
name: '', likeWork: '',
conversionStatus: '' situation: ''
}) })
const { pager, getLists, resetPage, resetParams } = usePaging({ const { pager, getLists, resetPage, resetParams } = usePaging({
fetchFun: postLists, fetchFun: clueLists,
params: queryParams params: queryParams
}) })
getLists() getLists()

View File

@ -1,6 +1,12 @@
<template> <template>
<el-card shadow="never" class="!border-none mt-4"> <el-card shadow="never" class="!border-none mt-4">
<ProTable ref="proTableRef" :columns="columns" :tableData="tableData" :loading="loading" :maxHeight="530"> <ProTable ref="proTableRef" :columns="columns" :tableData="tableData" :loading="loading" :maxHeight="530">
<template #listSource="{ row }">
<span>{{ parseClueSource(row.listSource) }}</span>
</template>
<template #situation="{ row }">
<span>{{ parseConversion(row.situation) }}</span>
</template>
<template #operation="{ row }"> <template #operation="{ row }">
<slot name="operation" :row="row" /> <slot name="operation" :row="row" />
</template> </template>
@ -9,6 +15,8 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { converStatusEnum, conversionMap } from '@/enums'
defineProps({ defineProps({
loading: { loading: {
type: Boolean, type: Boolean,
@ -21,14 +29,20 @@ defineProps({
}) })
const proTableRef = ref() const proTableRef = ref()
const columns = reactive([ const columns = reactive([
{ prop: 'accountName', label: '学生名字', width: 180 }, { prop: 'studentName', label: '学生名字', width: 180 },
{ prop: 'mobile', label: '联系电话', width: 180 }, { prop: 'phone', label: '联系电话', width: 180 },
{ prop: 'organization', label: '电销老师', width: 180 }, { prop: 'telemarketingTeacherName', label: '电销老师', width: 180 },
{ prop: 'position', label: '转化老师', width: 180 }, { prop: 'recruitTeacherName', label: '转化老师', width: 180 },
{ prop: 'position', label: '名单来源', width: 180 }, { prop: 'listSource', label: '名单来源', width: 180 },
{ prop: 'position', label: '转化情况', width: 180 }, { prop: 'situation', label: '转化情况', width: 180 },
{ prop: 'accountStatus', label: '创建人', width: 180 },
{ prop: 'operation', label: '操作', fixed: 'right', width: 250 } { prop: 'operation', label: '操作', fixed: 'right', width: 250 }
]) ])
const clueSource = shallowRef([{ label: '线下名单', value: 0 }])
const parseClueSource = (value: number) => {
const item = clueSource.value.find((item: any) => item.value === value)
return item?.label || ''
}
const parseConversion = computed(() => (value: converStatusEnum) => conversionMap[value])
</script> </script>
<style scoped></style> <style scoped></style>