|
|
@ -29,7 +29,13 @@ |
|
|
<div class="search-group2"> |
|
|
<div class="search-group2"> |
|
|
<div class="search-item"> |
|
|
<div class="search-item"> |
|
|
<span class="form-label">归属</span> |
|
|
<span class="form-label">归属</span> |
|
|
<el-input v-model="searchForm.inviter" placeholder="请输入归属账号" :disabled="permission!='2'" clearable style="height: 36px; width: 140px" /> |
|
|
|
|
|
|
|
|
<el-input v-model="searchForm.inviter" placeholder="请输入归属账号" :disabled="permission != '2'" clearable style="height: 36px; width: 140px" /> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="search-item"> |
|
|
|
|
|
<span class="form-label">来源</span> |
|
|
|
|
|
<el-select v-model="searchForm.origin_id" placeholder="请选择来源" clearable filterable style="height: 36px; width: 160px" :loading="isOriginLoading"> |
|
|
|
|
|
<el-option v-for="origin in originList" :key="origin.origin_id" :label="origin.origin_name" :value="origin.origin_id" /> |
|
|
|
|
|
</el-select> |
|
|
</div> |
|
|
</div> |
|
|
<div class="search-item"> |
|
|
<div class="search-item"> |
|
|
<span class="form-label">客户类型</span> |
|
|
<span class="form-label">客户类型</span> |
|
|
@ -45,6 +51,13 @@ |
|
|
</el-select> |
|
|
</el-select> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="search-group3"> |
|
|
|
|
|
<div class="search-item"> |
|
|
|
|
|
<span class="form-label">注册时间</span> |
|
|
|
|
|
<el-date-picker v-model="searchDate" type="datetimerange" :shortcuts="shortcuts" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" /> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="button-group"> |
|
|
<div class="button-group"> |
|
|
<el-button type="primary" @click="search">搜索</el-button> |
|
|
<el-button type="primary" @click="search">搜索</el-button> |
|
|
@ -65,7 +78,14 @@ |
|
|
<el-table-column prop="invitee" label="账号" align="center" header-align="center" /> |
|
|
<el-table-column prop="invitee" label="账号" align="center" header-align="center" /> |
|
|
<el-table-column prop="username" label="姓名" align="center" header-align="center" /> |
|
|
<el-table-column prop="username" label="姓名" align="center" header-align="center" /> |
|
|
<el-table-column prop="inviter" label="归属" align="center" header-align="center" /> |
|
|
<el-table-column prop="inviter" label="归属" align="center" header-align="center" /> |
|
|
<el-table-column prop="email" label="邮箱" align="center" header-align="center" /> |
|
|
|
|
|
|
|
|
<el-table-column prop="origin_name" label="来源" align="center" header-align="center" /> |
|
|
|
|
|
<el-table-column prop="email" label="邮箱" align="center" header-align="center" width="200"> |
|
|
|
|
|
<template #default="scope"> |
|
|
|
|
|
<el-tooltip effect="dark" :content="scope.row.email" placement="top"> |
|
|
|
|
|
<span class="ellipsis-text">{{ scope.row.email }}</span> |
|
|
|
|
|
</el-tooltip> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
<el-table-column prop="dialing_code" label="手机区号" align="center" header-align="center" /> |
|
|
<el-table-column prop="dialing_code" label="手机区号" align="center" header-align="center" /> |
|
|
<el-table-column prop="phone" label="手机号" align="center" header-align="center" /> |
|
|
<el-table-column prop="phone" label="手机号" align="center" header-align="center" /> |
|
|
<el-table-column prop="country" label="地区" align="center" header-align="center" /> |
|
|
<el-table-column prop="country" label="地区" align="center" header-align="center" /> |
|
|
@ -91,7 +111,7 @@ |
|
|
<script setup> |
|
|
<script setup> |
|
|
import { ref, reactive, onMounted, computed } from "vue"; |
|
|
import { ref, reactive, onMounted, computed } from "vue"; |
|
|
import { ElMessage } from "element-plus"; |
|
|
import { ElMessage } from "element-plus"; |
|
|
import { getInvitedListApi, exportInvitedApi,marketListApi, indicatorListApi, userDMListApi, exportDeepMateApi, exitDMApi, userDEListApi, exportDeepExploreApi, exitDEApi, detailDEApi } from "../../api/userPermissions"; |
|
|
|
|
|
|
|
|
import { getInvitedListApi, exportInvitedApi, marketListApi, getOriginListApi } from "../../api/userPermissions"; |
|
|
import router from "../../router"; |
|
|
import router from "../../router"; |
|
|
import { useRoute } from "vue-router"; |
|
|
import { useRoute } from "vue-router"; |
|
|
import { usePermissionStore } from "../../store/permission"; |
|
|
import { usePermissionStore } from "../../store/permission"; |
|
|
@ -107,11 +127,42 @@ const route = useRoute(); |
|
|
|
|
|
|
|
|
// 组件挂载时:获取地区列表 + 初始化表格数据 |
|
|
// 组件挂载时:获取地区列表 + 初始化表格数据 |
|
|
onMounted(async () => { |
|
|
onMounted(async () => { |
|
|
permission.value=permissionStore.permission; |
|
|
|
|
|
|
|
|
permission.value = permissionStore.permission; |
|
|
|
|
|
fetchOriginList(); |
|
|
fetchRegionList(); |
|
|
fetchRegionList(); |
|
|
getTableData(); |
|
|
getTableData(); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
const shortcuts = [ |
|
|
|
|
|
{ |
|
|
|
|
|
text: '最近7天', |
|
|
|
|
|
value: () => { |
|
|
|
|
|
const end = new Date() |
|
|
|
|
|
const start = new Date() |
|
|
|
|
|
start.setDate(start.getDate() - 7) |
|
|
|
|
|
return [start, end] |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
text: '最近1个月', |
|
|
|
|
|
value: () => { |
|
|
|
|
|
const end = new Date() |
|
|
|
|
|
const start = new Date() |
|
|
|
|
|
start.setMonth(start.getMonth() - 1) |
|
|
|
|
|
return [start, end] |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
text: '最近3个月', |
|
|
|
|
|
value: () => { |
|
|
|
|
|
const end = new Date() |
|
|
|
|
|
const start = new Date() |
|
|
|
|
|
start.setMonth(start.getMonth() - 3) |
|
|
|
|
|
return [start, end] |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
] |
|
|
|
|
|
|
|
|
// 地区下拉框 |
|
|
// 地区下拉框 |
|
|
const regionList = ref([]); |
|
|
const regionList = ref([]); |
|
|
const isRegionLoading = ref(false); |
|
|
const isRegionLoading = ref(false); |
|
|
@ -133,17 +184,41 @@ const fetchRegionList = async () => { |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
// 来源下拉框 |
|
|
|
|
|
const originList = ref([]); |
|
|
|
|
|
const isOriginLoading = ref(false); |
|
|
|
|
|
|
|
|
|
|
|
// 获取来源下拉框 |
|
|
|
|
|
const fetchOriginList = async () => { |
|
|
|
|
|
try { |
|
|
|
|
|
isOriginLoading.value = true; |
|
|
|
|
|
const data = await getOriginListApi({ |
|
|
|
|
|
token: token, |
|
|
|
|
|
app_form: "en", |
|
|
|
|
|
}); |
|
|
|
|
|
originList.value = data.list; |
|
|
|
|
|
} catch (error) { |
|
|
|
|
|
console.error("获取来源下拉框失败:", error); |
|
|
|
|
|
originList.value = []; |
|
|
|
|
|
} finally { |
|
|
|
|
|
isOriginLoading.value = false; |
|
|
|
|
|
} |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
// 搜索表单 |
|
|
// 搜索表单 |
|
|
const searchForm = reactive({ |
|
|
const searchForm = reactive({ |
|
|
inviter: "", |
|
|
|
|
|
invitee: "", |
|
|
invitee: "", |
|
|
username: "", |
|
|
username: "", |
|
|
phone: "", |
|
|
phone: "", |
|
|
email: "", |
|
|
email: "", |
|
|
country: "", |
|
|
|
|
|
|
|
|
inviter: "", |
|
|
|
|
|
origin_id: "", |
|
|
user_role: "", |
|
|
user_role: "", |
|
|
|
|
|
country: "", |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
const searchDate = ref([]); |
|
|
|
|
|
|
|
|
// 排序参数 |
|
|
// 排序参数 |
|
|
const sortOrder = ref(null); |
|
|
const sortOrder = ref(null); |
|
|
|
|
|
|
|
|
@ -162,13 +237,16 @@ const getTableData = async () => { |
|
|
tableLoading.value = true; |
|
|
tableLoading.value = true; |
|
|
const requestParams = { |
|
|
const requestParams = { |
|
|
token: token, |
|
|
token: token, |
|
|
inviter: searchForm.inviter, |
|
|
|
|
|
invitee: searchForm.invitee, |
|
|
invitee: searchForm.invitee, |
|
|
username: searchForm.username, |
|
|
username: searchForm.username, |
|
|
phone: searchForm.phone, |
|
|
phone: searchForm.phone, |
|
|
email: searchForm.email, |
|
|
email: searchForm.email, |
|
|
country: searchForm.country, |
|
|
|
|
|
|
|
|
inviter: searchForm.inviter, |
|
|
|
|
|
origin_id: searchForm.origin_id, |
|
|
user_role: searchForm.user_role, |
|
|
user_role: searchForm.user_role, |
|
|
|
|
|
country: searchForm.country, |
|
|
|
|
|
start_time: searchDate.value[0], |
|
|
|
|
|
end_time: searchDate.value[1], |
|
|
page: currentPage.value, |
|
|
page: currentPage.value, |
|
|
page_size: pageSizeDM.value, |
|
|
page_size: pageSizeDM.value, |
|
|
}; |
|
|
}; |
|
|
@ -197,7 +275,6 @@ const handleCurrentChangeDM = (val) => { |
|
|
console.log(`当前页: ${val}`); |
|
|
console.log(`当前页: ${val}`); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 搜索按钮 |
|
|
// 搜索按钮 |
|
|
const search = () => { |
|
|
const search = () => { |
|
|
currentPage.value = 1; |
|
|
currentPage.value = 1; |
|
|
@ -206,13 +283,16 @@ const search = () => { |
|
|
|
|
|
|
|
|
// 重置按钮 |
|
|
// 重置按钮 |
|
|
const resetBn = () => { |
|
|
const resetBn = () => { |
|
|
searchForm.inviter="", |
|
|
|
|
|
searchForm.invitee="", |
|
|
|
|
|
searchForm.username="", |
|
|
|
|
|
searchForm.phone="", |
|
|
|
|
|
searchForm.email="", |
|
|
|
|
|
searchForm.country="", |
|
|
|
|
|
searchForm.user_role="", |
|
|
|
|
|
|
|
|
searchForm.invitee = ""; |
|
|
|
|
|
searchForm.username = ""; |
|
|
|
|
|
searchForm.phone = ""; |
|
|
|
|
|
searchForm.email = ""; |
|
|
|
|
|
searchForm.inviter = ""; |
|
|
|
|
|
searchForm.origin_id = ""; |
|
|
|
|
|
searchForm.user_role = ""; |
|
|
|
|
|
searchForm.country = ""; |
|
|
|
|
|
searchDate.value=[]; |
|
|
|
|
|
|
|
|
currentPage.value = 1; |
|
|
currentPage.value = 1; |
|
|
pageSizeDM.value = 10; |
|
|
pageSizeDM.value = 10; |
|
|
getTableData(); |
|
|
getTableData(); |
|
|
@ -222,13 +302,16 @@ const resetBn = () => { |
|
|
const exportExcel = async () => { |
|
|
const exportExcel = async () => { |
|
|
const requestParams = { |
|
|
const requestParams = { |
|
|
token: token, |
|
|
token: token, |
|
|
inviter: searchForm.inviter, |
|
|
|
|
|
invitee: searchForm.invitee, |
|
|
invitee: searchForm.invitee, |
|
|
username: searchForm.username, |
|
|
username: searchForm.username, |
|
|
phone: searchForm.phone, |
|
|
phone: searchForm.phone, |
|
|
email: searchForm.email, |
|
|
email: searchForm.email, |
|
|
country: searchForm.country, |
|
|
|
|
|
|
|
|
inviter: searchForm.inviter, |
|
|
|
|
|
origin_id: searchForm.origin_id, |
|
|
user_role: searchForm.user_role, |
|
|
user_role: searchForm.user_role, |
|
|
|
|
|
start_time: searchDate.value[0], |
|
|
|
|
|
end_time: searchDate.value[1], |
|
|
|
|
|
country: searchForm.country, |
|
|
}; |
|
|
}; |
|
|
const data = await exportInvitedApi(requestParams); |
|
|
const data = await exportInvitedApi(requestParams); |
|
|
if (data != "") { |
|
|
if (data != "") { |
|
|
@ -311,7 +394,7 @@ const checkRemark = () => { |
|
|
/* 搜索区域 */ |
|
|
/* 搜索区域 */ |
|
|
.search-container { |
|
|
.search-container { |
|
|
display: flex; |
|
|
display: flex; |
|
|
height: 120px; |
|
|
|
|
|
|
|
|
height: 170px; |
|
|
flex-direction: column; |
|
|
flex-direction: column; |
|
|
justify-content: center; |
|
|
justify-content: center; |
|
|
align-items: flex-start; |
|
|
align-items: flex-start; |
|
|
@ -349,6 +432,13 @@ const checkRemark = () => { |
|
|
gap: 15px; |
|
|
gap: 15px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.search-group3 { |
|
|
|
|
|
display: flex; |
|
|
|
|
|
margin-top: 15px; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
gap: 15px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/* 单个搜索项 */ |
|
|
/* 单个搜索项 */ |
|
|
.search-item { |
|
|
.search-item { |
|
|
display: flex; |
|
|
display: flex; |
|
|
@ -386,7 +476,7 @@ const checkRemark = () => { |
|
|
border-radius: 12px !important; |
|
|
border-radius: 12px !important; |
|
|
overflow: hidden !important; |
|
|
overflow: hidden !important; |
|
|
border: 1px solid #e4e7ed !important; |
|
|
border: 1px solid #e4e7ed !important; |
|
|
min-height: 700px; |
|
|
|
|
|
|
|
|
min-height: 650px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.table-roundedDE { |
|
|
.table-roundedDE { |
|
|
|