From 5f685326c52d2bbdebdef23aaedd92d653385121 Mon Sep 17 00:00:00 2001 From: xpz2018 <107107461@qq.com> Date: Fri, 6 Jun 2025 10:49:46 +0800 Subject: [PATCH] no message --- package.json | 2 +- src/api/clue/index.ts | 6 + src/api/sys/user.ts | 2 +- src/enums/customerEnum.ts | 28 ++ src/layouts/default/header/index.vue | 4 +- src/views/clue/clueList/data.ts | 400 ++++------------ src/views/clue/clueList/index.vue | 70 +-- src/views/clue/clueList/modal.vue | 76 --- src/views/clue/cluePool/data.ts | 659 ++++++++++++++++++++++++++- src/views/clue/cluePool/index.vue | 187 +++++++- src/views/clue/cluePool/modal.vue | 196 ++++++++ src/views/clue/customer/index.vue | 35 +- 12 files changed, 1166 insertions(+), 499 deletions(-) delete mode 100644 src/views/clue/clueList/modal.vue create mode 100644 src/views/clue/cluePool/modal.vue diff --git a/package.json b/package.json index c3cee3b..f227538 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "vue-router": "^4.0.14", "vue-types": "^4.1.1", "webpack-aliyun-oss": "^0.5.9", - "xlsx": "^0.18.5" + "xlsx": "^0.17.0" }, "devDependencies": { "@commitlint/cli": "^16.2.3", diff --git a/src/api/clue/index.ts b/src/api/clue/index.ts index ec6da9f..52d0e24 100644 --- a/src/api/clue/index.ts +++ b/src/api/clue/index.ts @@ -7,6 +7,12 @@ export const getCluePage = (params: any) => params, }) +export const getClueList = (params: any) => + defHttp.get>({ + url: '/dating-clue-service/user/page/own-dating-clue', + params, +}) + export const createClueRecord = (params: any) => defHttp.post({ url: '/dating-clue-service/user/create/dating-clue', params }) export const editClueRecord = (params: any) => defHttp.post({ url: '/dating-clue-service/user/edit/dating-clue', params }) diff --git a/src/api/sys/user.ts b/src/api/sys/user.ts index b1be81d..635de95 100644 --- a/src/api/sys/user.ts +++ b/src/api/sys/user.ts @@ -20,7 +20,7 @@ enum Api { TestRetry = '/testRetry', AuthorizeByCaptcha = '/dating-agency-uec/authorize/by-captcha', GetAuthCaptcha = '/dating-agency-uec/authorize/get/auth-captcha', - GetOwnOrganizationList = '/dating-agency-uec/user/list/own-organization', + GetOwnOrganizationList = '/dating-agency-uec/user/list/own-organization/by-dating-clue', GetBaseInfo = '/dating-agency-uec/user/get/base-info', } diff --git a/src/enums/customerEnum.ts b/src/enums/customerEnum.ts index fef49bd..690f408 100644 --- a/src/enums/customerEnum.ts +++ b/src/enums/customerEnum.ts @@ -13,3 +13,31 @@ export const sourceList = [ { label: '红娘录入', value: 2 }, { label: '红娘资料', value: 3 }, ] + +export const channelList = [ + { label: '线上录入', value: 1 }, + { label: '抖音', value: 2 }, + { label: '小红书', value: 3 }, +] + +export const educationList = [ + { label: '高中及以下', value: 0 }, + { label: '中专', value: 1 }, + { label: '大专', value: 2 }, + { label: '大学本科', value: 3 }, + { label: '硕士', value: 4 }, + { label: '博士', value: 5 }, +] + +export const maritalList = [ + { label: '未婚', value: 0 }, + { label: '离异', value: 1 }, + { label: '丧偶的', value: 2 }, +] + +export const clueStatusList = [ + { label: '待分配', value: 1 }, + { label: '跟进中', value: 2 }, + { label: '无效线索', value: 3 }, + { label: '有效线索', value: 4 }, +] \ No newline at end of file diff --git a/src/layouts/default/header/index.vue b/src/layouts/default/header/index.vue index 672301b..86372ce 100644 --- a/src/layouts/default/header/index.vue +++ b/src/layouts/default/header/index.vue @@ -47,7 +47,7 @@ /> -->
{{orgName}} - +
@@ -173,11 +173,9 @@ const orgName = computed(() => { var orgId = localStorage.getItem(ORG_ID_KEY) + '' - console.log(orgId) var orgString = localStorage.getItem(ORG_LIST_KEY) + '' var orgList = JSON.parse(orgString) var org = orgList.find(item => item.orgId === orgId) - console.log(org) return org.fullName }) diff --git a/src/views/clue/clueList/data.ts b/src/views/clue/clueList/data.ts index 50b6fc8..5a2459e 100644 --- a/src/views/clue/clueList/data.ts +++ b/src/views/clue/clueList/data.ts @@ -1,69 +1,5 @@ import { BasicColumn, FormSchema } from '/@/components/Table' -const userTypeList = [ - { label: '正常用户', value: 1 }, - { label: '录入用户', value: 2}, - { label: '红娘', value: 3 }, -] - -export const tableColumns: BasicColumn[] = [ - { title: '用户信息', dataIndex: 'userinfo', slots: { customRender: 'userinfo' } }, - { width: 80, title: '性别', dataIndex: 'genderCode' }, - { width: 160, title: '渠道来源', dataIndex: 'channel' }, - { width: 120, title: '状态', dataIndex: 'status' }, - { width: 160, title: '手机号码', dataIndex: 'userPhone' }, - { width: 120, title: '核验人', dataIndex: 'nickName' }, - { width: 120, title: '跟进状态', dataIndex: 'userMarriageInformationType', - customRender: ({ text }) => { - return userTypeList.find((find) => find.value === text)?.label - }, - }, - { width: 200, title: '最后跟进时间', dataIndex: 'contentTime' }, - { width: 200, title: '录入时间', dataIndex: 'contentTime' }, -] - -export const tableFormSchema: FormSchema[] = [ - { - field: 'nickName', - label: '用户昵称', - component: 'Input', - colProps: { span: 6}, - }, - { - field: 'nickName', - label: '用户昵称', - component: 'Input', - colProps: { span: 6}, - }, - { - field: 'nickName', - label: '用户昵称', - component: 'Input', - colProps: { span: 6}, - }, - { - field: 'nickName', - label: '用户昵称', - component: 'Input', - colProps: { span: 6}, - }, - { - field: 'nickName', - label: '用户昵称', - component: 'Input', - colProps: { span: 6}, - }, - { - field: 'nickName', - label: '用户昵称', - component: 'Input', - colProps: { span: 6}, - }, -] - -import { ref } from 'vue' -import dayjs, { Dayjs } from 'dayjs' -import { genderList } from '/@/enums/customerEnum' -import { useAddressData } from '/@/hooks/common' +import { genderList, channelList, clueStatusList } from '/@/enums/customerEnum' import { getIncomeList, getNationList, @@ -79,301 +15,123 @@ import { getCarPurchaseSituation, } from '/@/api/essentialData' -// 基础信息的额外数据 -export const basicInfoData = ref({}) -// 获取地区数据 -const { addressList, domicilePlaceList } = useAddressData() - -// 获取职业列表 -export const occupationList = ref([]) -getOccupationList().then((res) => { - handleOccupationList(res) - occupationList.value = res || [] -}) -function handleOccupationList(data: any, ifFirst = true) { - data?.forEach?.((item: any) => { - const { industry, industryCode, occupation, occupationCode, occupationList } = item - item.label = ifFirst ? industry : occupation - item.value = ifFirst ? industryCode : occupationCode - if (occupationList?.length) { - item.children = occupationList - handleOccupationList(occupationList, false) - } - }) -} +const userTypeList = [ + { label: '正常用户', value: 1 }, + { label: '录入用户', value: 2}, + { label: '红娘', value: 3 }, +] -export const addressName = ref([]) -// 基本信息 -export const modalFormSchema: FormSchema[] = [ - { - field: 'genderCode', - label: '性别', - colProps: { span: 8 }, - component: 'Select', - 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: '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 - }, +export const tableColumns: BasicColumn[] = [ + { title: '用户信息', dataIndex: 'userinfo', slots: { customRender: 'userinfo' } }, + { width: 80, title: '性别', dataIndex: 'genderCode', customRender: ({ text }) => { return genderList.find((find) => find.value === text)?.label} }, + { width: 120, title: '手机号码', dataIndex: 'phone' }, + { width: 120, title: '渠道来源', dataIndex: 'channelType', + customRender: ({ text }) => { + return channelList.find((find) => find.value === text)?.label }, }, - { - field: 'domicilePlace', - label: '户口所在地', - colProps: { span: 8 }, - component: 'Cascader', - componentProps: () => { - return { - options: domicilePlaceList.value, - onChange: (_: any, v: any) => { - basicInfoData.value.domicilePlaceProvinceName = v?.[0]?.label - basicInfoData.value.domicilePlaceCityName = v?.[1]?.label - }, - } - }, + { width: 100, title: '状态', dataIndex: 'validStatus', + customRender: ({ text }) => { + return clueStatusList.find((find) => find.value === text)?.label + }, }, - { - field: 'birthDate', - label: '出生日期', - colProps: { span: 8 }, - component: 'DatePicker', - componentProps: ({ formModel }) => { - return { - style: { width: '100%' }, - disabled: !!formModel.name && formModel.name !== -1, - disabledDate: (current: Dayjs) => { - const date: Dayjs = dayjs().subtract(18, 'year') - return current && current > date.endOf('year') - }, - } + { width: 120, title: '创建人', dataIndex: 'creatorName' }, + { width: 120, title: '核验人', dataIndex: 'verifierName' }, + { width: 120, title: '跟进状态', dataIndex: 'userMarriageInformationType', + customRender: ({ text }) => { + return userTypeList.find((find) => find.value === text)?.label }, }, - { field: 'height', label: '身高(cm)', component: 'InputNumber', colProps: { span: 8 }, }, + { width: 160, title: '最后跟进时间', dataIndex: 'finalFollowTime' }, + { width: 160, title: '录入时间', dataIndex: 'creatTime' }, +] + +export const tableFormSchema: FormSchema[] = [ { - field: 'educationCode', - label: '学历', - colProps: { span: 8 }, - component: 'ApiSelect', + field: 'genderCode', + label: '用户性别', + colProps: { span: 6 }, + component: 'Select', componentProps: { - labelField: 'desc', - api: getEducationList, - getPopupContainer: () => document.body, - onChange: (_: any, v: any) => { - basicInfoData.value.education = v?.label - }, + options: genderList, }, }, { - field: 'incomeCode', - label: '月收入', - colProps: { span: 8 }, - component: 'ApiSelect', + field: 'channelType', + label: '渠道来源', + colProps: { span: 6 }, + component: 'Select', componentProps: { - labelField: 'desc', - api: getIncomeList, - getPopupContainer: () => document.body, - onChange: (_: any, v: any) => { - basicInfoData.value.income = v?.label - }, + options: channelList, }, }, // { - // field: 'hometown', - // label: '家乡', - // colProps: { span: 8 }, - // component: 'Cascader', - // componentProps: () => { - // return { - // options: domicilePlaceList.value, - // onChange: (_: any, v: any) => { - // basicInfoData.value.hometownProvinceName = v?.[0]?.label - // basicInfoData.value.hometownCityName = v?.[1]?.label - // }, - // } - // }, + // 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: 'maritalStatusCode', label: '婚姻状况', - colProps: { span: 8 }, + colProps: { span: 6 }, component: 'ApiSelect', componentProps: { labelField: 'desc', api: getMaritalStatusList, - getPopupContainer: () => document.body, - onChange: (_: any, v: any) => { - basicInfoData.value.maritalStatusName = v?.label - }, - }, - }, - { field: 'childrenNum', label: '孩子数量', component: 'InputNumber', colProps: { span: 8 }, }, - { - field: 'nationCode', - label: '民族', - colProps: { span: 8 }, - component: 'ApiSelect', - componentProps: { - labelField: 'cn', - valueField: 'id', - api: getNationList, - getPopupContainer: () => document.body, - onChange: (_: any, v: any) => { - basicInfoData.value.nation = v?.label - }, - }, - }, - // { - // field: 'bodilyFormCode', - // label: '体型', - // colProps: { span: 8 }, - // component: 'ApiSelect', - // componentProps: { - // labelField: 'desc', - // api: getBodilyFormList, - // getPopupContainer: () => document.body, - // onChange: (_: any, v: any) => { - // basicInfoData.value.bodilyForm = v?.label - // }, - // }, - // }, - // { - // field: 'accountTypeCode', - // label: '户口', - // colProps: { span: 8 }, - // component: 'ApiSelect', - // componentProps: { - // labelField: 'desc', - // api: getAccountTypeList, - // getPopupContainer: () => document.body, - // onChange: (_: any, v: any) => { - // basicInfoData.value.accountTypeName = v?.label - // }, - // }, - // }, - // { - // field: 'nativePlaceCode', - // label: '籍贯', - // colProps: { span: 8 }, - // component: 'Select', - // componentProps: { - // options: domicilePlaceList, - // getPopupContainer: () => document.body, - // onChange: (_: any, v: any) => { - // basicInfoData.value.nativePlaceName = v?.label - // }, - // }, - // }, - { - label: '职业', - field: 'occupationList', - colProps: { span: 8 }, - component: 'Cascader', - componentProps: { - options: occupationList, - getPopupContainer: () => document.body, - onChange: (_: any, v: any) => { - const industry = v?.[0] || {} - const occupation = v?.[1] || {} - basicInfoData.value.industry = industry.label - basicInfoData.value.industryCode = industry.value - basicInfoData.value.occupation = occupation.label - basicInfoData.value.occupationCode = occupation.value - }, }, }, { - field: 'onlyChild', - label: '是否独生子女', - colProps: { span: 8 }, - component: 'Select', - componentProps: { - options: [ - { label: '是', value: 1 }, - { label: '否', value: 0 }, - ], - }, + field: 'age', + label: '年龄', + slot: 'age', + component: 'InputNumber', + colProps: { span: 6 }, }, { - field: 'propertyPermitsCode', - label: '购房情况', - colProps: { span: 8 }, + field: 'educationCode', + label: '学历', + colProps: { span: 6 }, component: 'ApiSelect', componentProps: { labelField: 'desc', - api: getPropertyPermits, - getPopupContainer: () => document.body, - onChange: (_: any, v: any) => { - basicInfoData.value.propertyPermits = v?.label - }, + api: getEducationList, }, }, { - field: 'carPurchaseSituationCode', - label: '购车情况', - colProps: { span: 8 }, - component: 'ApiSelect', - componentProps: { - labelField: 'desc', - api: getCarPurchaseSituation, - getPopupContainer: () => document.body, - onChange: (_: any, v: any) => { - basicInfoData.value.carPurchaseSituation = v?.label - }, - }, + field: 'createTime', + label: '创建时间', + component: 'RangePicker', + colProps: { span: 6 }, }, { - field: 'constellationCode', - label: '星座', - colProps: { span: 8 }, - component: 'ApiSelect', - componentProps: { - labelField: 'desc', - api: getConstellationList, - getPopupContainer: () => document.body, - onChange: (_: any, v: any) => { - basicInfoData.value.constellation = v?.label - }, - }, + field: 'creatorName', + label: '创建人名称', + component: 'Input', + colProps: { span: 6}, }, { - field: 'profilePhoto', - component: 'Upload', - label: '资料头像', - colProps: { span: 8 }, - slot: 'profilePhoto', + field: 'followTime', + label: '最后跟进时间', + component: 'RangePicker', + colProps: { span: 6 }, }, { - field: 'describeInfo', - label: '个人描述', - component: 'InputTextArea', - colProps: { span: 16 }, - componentProps: ({ formModel }) => { - return { - autoSize: { - minRows: 4, - }, - disabled: formModel?.describeAudit, - } - }, + field: 'verifierName', + label: '核验人名称', + component: 'Input', + colProps: { span: 6}, }, ] diff --git a/src/views/clue/clueList/index.vue b/src/views/clue/clueList/index.vue index aad209e..9f4de01 100644 --- a/src/views/clue/clueList/index.vue +++ b/src/views/clue/clueList/index.vue @@ -1,36 +1,6 @@