提交 994bf35c authored 作者: matian's avatar matian

日期搜索加change事件

上级 539e2a19
...@@ -12,7 +12,7 @@ export function getChannelList(params: { ...@@ -12,7 +12,7 @@ export function getChannelList(params: {
tags?: string tags?: string
company_short_name?: string company_short_name?: string
['per-page']: string ['per-page']: string
page: string page?: string
}) { }) {
return httpRequest.get('/api/customer/v1/channel/index/index', { params }) return httpRequest.get('/api/customer/v1/channel/index/index', { params })
} }
......
<script setup lang="ts"> <script setup lang="ts">
import shortcuts from '@/utils/shortcut' import shortcuts from '@/utils/shortcut'
import { getConditionList, getChannelList } from '../api' import { getConditionList, getChannelList } from '../api'
const appList = ref()
const tagsList = ref([]) const tagsList = ref([])
getConditionList({ channel: true }).then(res => { getConditionList({ channel: true }).then(res => {
tagsList.value = res.data.channel.tags.reduce((t: any, cur: any) => { tagsList.value = res.data.channel.tags.reduce((t: any, cur: any) => {
...@@ -14,8 +15,11 @@ const listOptions = $computed(() => { ...@@ -14,8 +15,11 @@ const listOptions = $computed(() => {
return { return {
remote: { remote: {
beforeRequest(params: any) { beforeRequest(params: any) {
params.created_time_start = params.createTime[0] if (params.createTime) {
params.created_time_end = params.createTime[1] params.created_time_start = params.createTime[0]
params.created_time_end = params.createTime[1]
delete params.createTime
}
return params return params
}, },
httpRequest: getChannelList, httpRequest: getChannelList,
...@@ -77,6 +81,9 @@ const listOptions = $computed(() => { ...@@ -77,6 +81,9 @@ const listOptions = $computed(() => {
] ]
} }
}) })
const handleChange = () => {
appList.value.refetch()
}
</script> </script>
<template> <template>
<AppCard title="BP渠道信息"> <AppCard title="BP渠道信息">
...@@ -90,6 +97,7 @@ const listOptions = $computed(() => { ...@@ -90,6 +97,7 @@ const listOptions = $computed(() => {
start-placeholder="创建开始时间" start-placeholder="创建开始时间"
end-placeholder="创建结束时间" end-placeholder="创建结束时间"
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
@change="handleChange"
/> />
</template> </template>
......
...@@ -8,7 +8,7 @@ export function getContactList(params: { ...@@ -8,7 +8,7 @@ export function getContactList(params: {
school_name?: string school_name?: string
college?: string college?: string
['per-page']?: string ['per-page']?: string
page: string page?: string
}) { }) {
return httpRequest.get('/api/customer/v1/school/user/index', { params }) return httpRequest.get('/api/customer/v1/school/user/index', { params })
} }
......
...@@ -13,6 +13,8 @@ export function getAllUserList(params: { ...@@ -13,6 +13,8 @@ export function getAllUserList(params: {
name?: string name?: string
email?: string email?: string
mobile?: string mobile?: string
['per-page']?: string
page?: string
}) { }) {
return httpRequest.get('/api/customer/v1/customer/all/index', { params }) return httpRequest.get('/api/customer/v1/customer/all/index', { params })
} }
...@@ -5,7 +5,7 @@ import { getConditionList, getAllUserList } from '../api' ...@@ -5,7 +5,7 @@ import { getConditionList, getAllUserList } from '../api'
const router = useRouter() const router = useRouter()
const projectList = ref([]) const projectList = ref([])
const systemList = ref([]) const systemList = ref([])
const appList = ref()
getConditionList({ all: true }).then(res => { getConditionList({ all: true }).then(res => {
projectList.value = res.data.all.projects projectList.value = res.data.all.projects
systemList.value = res.data.all.system_id systemList.value = res.data.all.system_id
...@@ -16,8 +16,11 @@ const listOptions = $computed(() => { ...@@ -16,8 +16,11 @@ const listOptions = $computed(() => {
return { return {
remote: { remote: {
beforeRequest(params: any) { beforeRequest(params: any) {
params.created_time_start = params.timeRange[0] if (params.timeRange) {
params.created_time_end = params.timeRange[1] params.created_time_start = params.timeRange[0]
params.created_time_end = params.timeRange[1]
delete params.timeRange
}
return params return params
}, },
httpRequest: getAllUserList, httpRequest: getAllUserList,
...@@ -106,6 +109,9 @@ const handleDetail = (row: any) => { ...@@ -106,6 +109,9 @@ const handleDetail = (row: any) => {
router.push(`/user/xiaoetong/detail/?id=${row.id}`) router.push(`/user/xiaoetong/detail/?id=${row.id}`)
} }
} }
const handleChange = () => {
appList.value.refetch()
}
</script> </script>
<template> <template>
<AppCard title="全部学员信息"> <AppCard title="全部学员信息">
...@@ -119,6 +125,7 @@ const handleDetail = (row: any) => { ...@@ -119,6 +125,7 @@ const handleDetail = (row: any) => {
start-placeholder="创建开始时间" start-placeholder="创建开始时间"
end-placeholder="创建结束时间" end-placeholder="创建结束时间"
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
@change="handleChange"
/> />
</template> </template>
<template #table-x="{ row }"> <template #table-x="{ row }">
......
...@@ -17,6 +17,8 @@ export function getGooseList(params: { ...@@ -17,6 +17,8 @@ export function getGooseList(params: {
wx_email?: string wx_email?: string
from?: string from?: string
sales?: string sales?: string
['per-page']?: string
page: string
}) { }) {
return httpRequest.get('/api/customer/v1/customer/xiaoe/index', { params }) return httpRequest.get('/api/customer/v1/customer/xiaoe/index', { params })
} }
......
<script setup lang="ts"> <script setup lang="ts">
import shortcuts from '@/utils/shortcut' import shortcuts from '@/utils/shortcut'
import { getConditionList, getGooseList } from '../api' import { getConditionList, getGooseList } from '../api'
const appList = ref()
const fromMapList = ref([]) const fromMapList = ref([])
const provinceMapList = ref([]) const provinceMapList = ref([])
const salesList = ref([]) const salesList = ref([])
...@@ -22,8 +23,11 @@ const listOptions = $computed(() => { ...@@ -22,8 +23,11 @@ const listOptions = $computed(() => {
remote: { remote: {
httpRequest: getGooseList, httpRequest: getGooseList,
beforeRequest(params: any) { beforeRequest(params: any) {
params.created_at_start = params.timeRange[0] if (params.timeRange) {
params.created_at_end = params.timeRange[1] params.created_at_start = params.timeRange[0]
params.created_at_end = params.timeRange[1]
delete params.timeRange
}
return params return params
}, },
params: { params: {
...@@ -116,6 +120,9 @@ const listOptions = $computed(() => { ...@@ -116,6 +120,9 @@ const listOptions = $computed(() => {
] ]
} }
}) })
const handleChange = () => {
appList.value.refetch()
}
</script> </script>
<template> <template>
<AppCard title="小鹅通客户"> <AppCard title="小鹅通客户">
...@@ -129,6 +136,7 @@ const listOptions = $computed(() => { ...@@ -129,6 +136,7 @@ const listOptions = $computed(() => {
start-placeholder="创建开始时间" start-placeholder="创建开始时间"
end-placeholder="创建结束时间" end-placeholder="创建结束时间"
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
@change="handleChange"
/> />
</template> </template>
......
...@@ -15,6 +15,8 @@ export function getPeakUserList(params: { ...@@ -15,6 +15,8 @@ export function getPeakUserList(params: {
source?: string source?: string
createuser_name?: string createuser_name?: string
owner?: string owner?: string
['per-page']?: string
page?: string
}) { }) {
return httpRequest.get('/api/customer/v1/customer/dustess/index', { params }) return httpRequest.get('/api/customer/v1/customer/dustess/index', { params })
} }
......
<script setup lang="ts"> <script setup lang="ts">
import shortcuts from '@/utils/shortcut' import shortcuts from '@/utils/shortcut'
import { getConditionList, getPeakUserList } from '../api' import { getConditionList, getPeakUserList } from '../api'
const appList = ref()
const staffList = ref([]) const staffList = ref([])
const sourceMapList = ref([]) const sourceMapList = ref([])
getConditionList({ dustess: true }).then((res: any) => { getConditionList({ dustess: true }).then((res: any) => {
...@@ -13,8 +14,11 @@ const listOptions = $computed(() => { ...@@ -13,8 +14,11 @@ const listOptions = $computed(() => {
return { return {
remote: { remote: {
beforeRequest(params: any) { beforeRequest(params: any) {
params.createtime_start = params.timeRange[0] if (params.timeRange) {
params.createtime_end = params.timeRange[1] params.createtime_start = params.timeRange[0]
params.createtime_end = params.timeRange[1]
delete params.timeRange
}
return params return params
}, },
httpRequest: getPeakUserList, httpRequest: getPeakUserList,
...@@ -96,6 +100,9 @@ const listOptions = $computed(() => { ...@@ -96,6 +100,9 @@ const listOptions = $computed(() => {
] ]
} }
}) })
const handleChange = () => {
appList.value.refetch()
}
</script> </script>
<template> <template>
<AppCard title="尘峰客户"> <AppCard title="尘峰客户">
...@@ -109,6 +116,7 @@ const listOptions = $computed(() => { ...@@ -109,6 +116,7 @@ const listOptions = $computed(() => {
start-placeholder="创建开始时间" start-placeholder="创建开始时间"
end-placeholder="创建结束时间" end-placeholder="创建结束时间"
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
@change="handleChange"
/> />
</template> </template>
......
<script setup lang="ts"> <script setup lang="ts">
import shortcuts from '@/utils/shortcut' import shortcuts from '@/utils/shortcut'
import { getConditionList, getWechatUserList } from '../api' import { getConditionList, getWechatUserList } from '../api'
const appList = ref()
const departmentsList: any = ref([]) const departmentsList: any = ref([])
const addWayList: any = ref([]) const addWayList: any = ref([])
const tagsList: any = ref([]) const tagsList: any = ref([])
...@@ -22,8 +23,11 @@ const listOptions = $computed(() => { ...@@ -22,8 +23,11 @@ const listOptions = $computed(() => {
return { return {
remote: { remote: {
beforeRequest(params: any) { beforeRequest(params: any) {
params.create_time_start = params.timeRange[0] if (params.timeRange) {
params.create_time_start = params.timeRange[1] params.create_time_start = params.timeRange[0]
params.create_time_end = params.timeRange[1]
delete params.timeRange
}
return params return params
}, },
httpRequest: getWechatUserList, httpRequest: getWechatUserList,
...@@ -105,6 +109,9 @@ const listOptions = $computed(() => { ...@@ -105,6 +109,9 @@ const listOptions = $computed(() => {
] ]
} }
}) })
const handleChange = () => {
appList.value.refetch()
}
</script> </script>
<template> <template>
<AppCard title="企微客户"> <AppCard title="企微客户">
...@@ -126,6 +133,7 @@ const listOptions = $computed(() => { ...@@ -126,6 +133,7 @@ const listOptions = $computed(() => {
start-placeholder="创建开始时间" start-placeholder="创建开始时间"
end-placeholder="创建结束时间" end-placeholder="创建结束时间"
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
@change="handleChange"
/> />
</template> </template>
<template #remark_mobiles="{ row }"> <template #remark_mobiles="{ row }">
......
...@@ -19,6 +19,8 @@ export function getZwsUserList(params: { ...@@ -19,6 +19,8 @@ export function getZwsUserList(params: {
phone_number?: string phone_number?: string
sales_rep?: string sales_rep?: string
channel?: string channel?: string
['per-page']?: string
page?: string
}) { }) {
return httpRequest.get('/api/customer/v1/customer/zws/index', { params }) return httpRequest.get('/api/customer/v1/customer/zws/index', { params })
} }
......
<script setup lang="ts"> <script setup lang="ts">
import shortcuts from '@/utils/shortcut' import shortcuts from '@/utils/shortcut'
import { getConditionList, getZwsUserList } from '../api' import { getConditionList, getZwsUserList } from '../api'
const appList = ref()
const agentsList = ref([]) const agentsList = ref([])
const projectsList = ref([]) const projectsList = ref([])
const applicationList = ref([]) const applicationList = ref([])
...@@ -20,15 +21,16 @@ const listOptions = $computed(() => { ...@@ -20,15 +21,16 @@ const listOptions = $computed(() => {
if (params.createTime) { if (params.createTime) {
params.create_time_start = params.createTime[0] params.create_time_start = params.createTime[0]
params.create_time_end = params.createTime[1] params.create_time_end = params.createTime[1]
delete params.createTime
} }
if (params.updatedTime) { if (params.updatedTime) {
params.updated_time_start = params.updatedTime[0] params.updated_time_start = params.updatedTime[0]
params.updated_time_end = params.updatedTime[1] params.updated_time_end = params.updatedTime[1]
delete params.updatedTime
} }
return params return params
}, },
httpRequest: getZwsUserList, httpRequest: getZwsUserList,
params: { params: {
createTime: [], createTime: [],
create_time_start: '', create_time_start: '',
...@@ -117,6 +119,9 @@ const listOptions = $computed(() => { ...@@ -117,6 +119,9 @@ const listOptions = $computed(() => {
] ]
} }
}) })
const handleChange = () => {
appList.value.refetch()
}
</script> </script>
<template> <template>
<AppCard title="ZWS学员信息"> <AppCard title="ZWS学员信息">
...@@ -130,6 +135,7 @@ const listOptions = $computed(() => { ...@@ -130,6 +135,7 @@ const listOptions = $computed(() => {
start-placeholder="创建开始时间" start-placeholder="创建开始时间"
end-placeholder="创建结束时间" end-placeholder="创建结束时间"
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
@change="handleChange"
/> />
</template> </template>
<template v-slot:updatedTime="{ params }"> <template v-slot:updatedTime="{ params }">
...@@ -141,6 +147,7 @@ const listOptions = $computed(() => { ...@@ -141,6 +147,7 @@ const listOptions = $computed(() => {
start-placeholder="更新开始时间" start-placeholder="更新开始时间"
end-placeholder="更新结束时间" end-placeholder="更新结束时间"
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
@change="handleChange"
/> />
</template> </template>
<template #table-x="{ row }"> <template #table-x="{ row }">
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论