diff --git a/src/api/clue/index.ts b/src/api/clue/index.ts index 28154f2..031501f 100644 --- a/src/api/clue/index.ts +++ b/src/api/clue/index.ts @@ -151,3 +151,20 @@ export const intendedCustomer = (params: any) => defHttp.post({ url: '/dating-cl export const getNextClueInfo = (params: any) => defHttp.get({ url: '/dating-clue-service/user/get/own-next-dating-clue/by/telephone-invitation-team', params}) +export const getClueFlowPage = (params: any) => + defHttp.get>({ + url: '/dating-clue-service/user/page/feed-delivery-clue/by/clue-team', + params, + }) + +export const auditFlowClue= (params: any) => + defHttp.post({ + url: '/dating-clue-service/user/audit/feed-delivery-clue', + params, + }) + +export const editFlowClue= (params: any) => + defHttp.post({url: '/dating-clue-service/user/update/feed-delivery-clue', params}) + +export const getFlowClueInfo = (params: any) => + defHttp.get({ url: '/dating-clue-service/user/get/feed-delivery-clue/detail', params }) \ No newline at end of file diff --git a/src/locales/lang/zh-CN/routes/clue.ts b/src/locales/lang/zh-CN/routes/clue.ts index 6bf8a7d..5a13194 100644 --- a/src/locales/lang/zh-CN/routes/clue.ts +++ b/src/locales/lang/zh-CN/routes/clue.ts @@ -3,6 +3,7 @@ export default { clueIndex: '线索数据统计', cluePool: '待分配线索', clueList: '已分配线索', + clueFlow: '投流线索', customer: '线索详情', poolist: '我的线索', followlist: '跟进记录' diff --git a/src/router/menu.ts b/src/router/menu.ts index 989af9d..c864eb3 100644 --- a/src/router/menu.ts +++ b/src/router/menu.ts @@ -59,6 +59,14 @@ const clueMenu: Menu = { title: 'routes.clue.clueList', }, }, + { + path: 'clueFlow', + name: 'ClueFlow', + component: '/clue/clueFlow/index.vue', + meta: { + title: 'routes.clue.clueFlow', + }, + }, { path: 'poolist', name: 'Poolist', diff --git a/src/router/menus/modules/clue.ts b/src/router/menus/modules/clue.ts index 5ae38fa..ff2944c 100644 --- a/src/router/menus/modules/clue.ts +++ b/src/router/menus/modules/clue.ts @@ -14,6 +14,10 @@ const clueMenu: MenuModule = { path: 'cluePool', name: t('routes.clue.cluePool'), }, + { + path: 'clueFlow', + name: t('routes.clue.clueFlow'), + }, { path: 'clueList', name: t('routes.clue.clueList'), diff --git a/src/router/routes/modules/clue.ts b/src/router/routes/modules/clue.ts index d6f29c6..40eb760 100644 --- a/src/router/routes/modules/clue.ts +++ b/src/router/routes/modules/clue.ts @@ -39,6 +39,14 @@ const clueRoute: AppRouteModule = { title: t('routes.clue.clueList'), }, }, + { + path: 'clueFlow', + name: 'ClueFlow', + component: () => import('/src/views/clue/clueFlow/index.vue'), + meta: { + title: t('routes.clue.clueFlow'), + }, + }, { path: 'poolist', name: 'Poolist', diff --git a/src/views/clue/clueFlow/checkModal.vue b/src/views/clue/clueFlow/checkModal.vue new file mode 100644 index 0000000..8d90379 --- /dev/null +++ b/src/views/clue/clueFlow/checkModal.vue @@ -0,0 +1,50 @@ + + + \ No newline at end of file diff --git a/src/views/clue/clueFlow/data.ts b/src/views/clue/clueFlow/data.ts new file mode 100644 index 0000000..90e4fd2 --- /dev/null +++ b/src/views/clue/clueFlow/data.ts @@ -0,0 +1,263 @@ +import { BasicColumn, FormSchema } from '/@/components/Table' +import { genderList, maritalList, educationList } from '/@/enums/customerEnum' +import { getIncomeList, getEducationList, getOccupationList, getMaritalStatusList} from '/@/api/essentialData' +import { h } from 'vue'; +import { Tag } from 'ant-design-vue'; + +export const flowStatusList = [ + { label: '待审核', value: 1, color: 'orange' }, + { label: '审核成功', value: 2, color: 'green' }, + { label: '审核失败', value: 3, color: 'red' }, + { label: '全部', value: '', color: 'red' }, +] + +export const tableColumns: BasicColumn[] = [ + { title: '用户昵称', dataIndex: 'nickName' }, + { width: 64, title: '头像', dataIndex: 'avatar', slots: { customRender: 'avatar' } }, + { width: 90, title: '用户性别', dataIndex: 'genderCode', customRender: ({ text }) => (text == 0 ? '男' : '女') }, + { width: 90, title: '出生年月', dataIndex: 'birthYear' }, + { width: 100, title: '电话号码', dataIndex: 'phone' }, + { width: 100, title: '微信号', dataIndex: 'weChatId' }, + { width: 80, title: '婚姻状态', dataIndex: 'maritalStatusCode', + customRender: ({ text }) => { + return maritalList.find((find) => find.value === text)?.label + }, + }, + { width: 60, title: '身高', dataIndex: 'height' }, + { width: 60, title: '体重', dataIndex: 'weight' }, + { width: 80, title: '学历', dataIndex: 'educationCode',customRender: ({ text }) => { + return educationList.find((find) => find.value === text)?.label + }, }, + { width: 120, title: '职业', dataIndex: 'occupation' }, + { + width: 100, title: '收入范围', + dataIndex: 'income', + customRender: ({ text, record }) => `${record['minimumIncome']}-${record['maximumIncome']}`, + }, + { + width: 160, title: '所在区域', + dataIndex: 'address', + customRender: ({ text, record }) => `${record['provinceName']}-${record['cityName']}-${record['districtName']}`, + }, + { width: 100, title: '注册日期', dataIndex: 'clueTime' }, + { width: 100, title: '线索来源', dataIndex: 'creatorName' }, + { width: 100, title: '状态', dataIndex: 'status', + customRender: ({ text }) => { + const item = flowStatusList.find((find) => find.value === text) || {} + return h(Tag, { color: item['color'] }, () => item['label']); + }, + }, +] + +export const tableFormSchema: FormSchema[] = [ + { + field: 'genderCode', + label: '用户性别', + colProps: { span: 6 }, + component: 'Select', + componentProps: { + options: genderList, + }, + }, + // { + // field: 'status', + // label: '状态', + // component: 'Input', + // colProps: { span: 6 }, + // }, + { + field: 'nickName', + label: '用户昵称', + component: 'Input', + colProps: { span: 6 }, + }, + { + field: 'phone', + label: '电话号码', + component: 'Input', + colProps: { span: 6 }, + }, + { + field: 'status', + label: '状态', + colProps: { span: 6 }, + component: 'Select', + componentProps: { + options: flowStatusList, + }, + }, + // { + // field: 'maritalStatusCode', + // label: '婚姻状况', + // colProps: { span: 6 }, + // component: 'ApiSelect', + // componentProps: { + // labelField: 'desc', + // api: getMaritalStatusList, + // }, + // }, + { + field: 'age', + label: '年龄', + slot: 'age', + component: 'InputNumber', + colProps: { span: 6 }, + }, + { + field: 'createTime', + label: '创建时间', + component: 'RangePicker', + colProps: { span: 6 }, + }, +] + +import { ref } from 'vue' +import { useAddressData } from '/@/hooks/common' +// 基础信息的额外数据 +export const basicInfoData = ref({}) +export const addressName = ref([]) +const { addressList } = useAddressData() + +// 获取职业列表 +export const occupationList = ref([]) +getOccupationList().then((res) => { + var list = [] + res.forEach(element => { + const { occupationList } = element + occupationList.forEach(item => { + list.push({label: item.occupation, value: item.occupationCode}) + }); + }); + occupationList.value = list +}) +// 基本信息 +export const modalFormSchema: FormSchema[] = [ + { + field: 'genderCode', + label: '性别', + colProps: { span: 8 }, + component: 'Select', + required: true, + componentProps: ({ formModel }) => { + return { + options: genderList, + disabled: !!formModel.name && formModel.name !== -1, + onChange: (_: any, v: any) => { + basicInfoData.value.genderValue = v?.label + }, + } + }, + }, + { field: 'nickName', label: '昵称', component: 'Input', colProps: { span: 8 },}, + { field: 'phone', label: '电话号码', component: 'Input', colProps: { span: 8 },}, + { field: 'weChatId', label: '微信号', component: 'Input', colProps: { span: 8 }, }, + { field: 'height', label: '身高(cm)', component: 'InputNumber', colProps: { span: 8 }, }, + { field: 'weight', label: '体重(kg)', component: 'InputNumber', colProps: { span: 8 }, }, + { field: 'birthYear', label: '出生年', component: 'Input', colProps: { span: 8 },}, + { + field: 'educationCode', + label: '学历', + colProps: { span: 8 }, + component: 'ApiSelect', + componentProps: { + labelField: 'desc', + api: getEducationList, + getPopupContainer: () => document.body, + onChange: (_: any, v: any) => { + basicInfoData.value.education = v?.label + }, + }, + }, + { + field: 'incomeCode', + label: '月收入', + colProps: { span: 8 }, + component: 'ApiSelect', + componentProps: { + labelField: 'desc', + api: getIncomeList, + getPopupContainer: () => document.body, + onChange: (_: any, v: any) => { + basicInfoData.value.income = v?.label + }, + }, + }, + { + field: 'maritalStatusCode', + label: '婚姻状况', + colProps: { span: 8 }, + component: 'ApiSelect', + componentProps: { + labelField: 'desc', + api: getMaritalStatusList, + getPopupContainer: () => document.body, + onChange: (_: any, v: any) => { + basicInfoData.value.maritalStatusName = v?.label + }, + }, + }, + { + field: 'address', + label: '现居住地', + colProps: { span: 8 }, + component: 'Cascader', + componentProps: { + options: addressList, + onChange: (_: any, v: any) => { + basicInfoData.value.provinceName = v?.[0]?.label + basicInfoData.value.cityName = v?.[1]?.label + basicInfoData.value.districtName = v?.[2]?.label + }, + }, + }, + { + label: '职业', + field: 'occupationCode', + colProps: { span: 8 }, + component: 'Select', + componentProps: { + options: occupationList, + getPopupContainer: () => document.body, + onChange: (_: any, v: any) => { + basicInfoData.value.occupation = v?.label + }, + }, + }, + { + field: 'profilePhoto', + component: 'Upload', + label: '资料头像', + colProps: { span: 8 }, + slot: 'profilePhoto', + }, + { + field: 'remark', + label: '个人描述', + component: 'InputTextArea', + colProps: { span: 16 }, + componentProps: ({ formModel }) => { + return { + autoSize: { + minRows: 4, + }, + disabled: formModel?.describeAudit, + } + }, + }, +] + +export const auditFormSchema: FormSchema[] = [ + { + label: '审核', + required: true, + field: 'status', + defaultValue: 1, + component: 'RadioGroup', + componentProps: { + options: [ + { label: '通过', value: 2 }, + { label: '失败', value: 3 }, + ], + }, + }, +] \ No newline at end of file diff --git a/src/views/clue/clueFlow/index.vue b/src/views/clue/clueFlow/index.vue new file mode 100644 index 0000000..3ff64f7 --- /dev/null +++ b/src/views/clue/clueFlow/index.vue @@ -0,0 +1,118 @@ + + + + diff --git a/src/views/clue/clueFlow/modal.vue b/src/views/clue/clueFlow/modal.vue new file mode 100644 index 0000000..3c436c2 --- /dev/null +++ b/src/views/clue/clueFlow/modal.vue @@ -0,0 +1,102 @@ + + +