|
@@ -112,9 +112,11 @@
|
|
|
const searchParams = ref({
|
|
const searchParams = ref({
|
|
|
types: 1,
|
|
types: 1,
|
|
|
date: defaultDateRange,
|
|
date: defaultDateRange,
|
|
|
|
|
+ startDate: defaultDateRange[0],
|
|
|
|
|
+ endDate: defaultDateRange[1],
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
- const search = ref({
|
|
|
|
|
|
|
+ const search = reactive({
|
|
|
types: 1,
|
|
types: 1,
|
|
|
startDate: defaultDateRange[0],
|
|
startDate: defaultDateRange[0],
|
|
|
endDate: defaultDateRange[1],
|
|
endDate: defaultDateRange[1],
|
|
@@ -143,7 +145,7 @@
|
|
|
|
|
|
|
|
const handleSearch = (params: any) => {
|
|
const handleSearch = (params: any) => {
|
|
|
const payload = { ...params }
|
|
const payload = { ...params }
|
|
|
- search.value = payload
|
|
|
|
|
|
|
+ Object.assign(search, payload)
|
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
|
tableRef.value?.refreshTable?.()
|
|
tableRef.value?.refreshTable?.()
|
|
|
})
|
|
})
|
|
@@ -154,10 +156,7 @@
|
|
|
...params,
|
|
...params,
|
|
|
types: 1,
|
|
types: 1,
|
|
|
}
|
|
}
|
|
|
- search.value = {
|
|
|
|
|
- ...params,
|
|
|
|
|
- types: 1,
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ Object.assign(search, params,{ types: 1,})
|
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
|
tableRef.value?.refreshTable?.()
|
|
tableRef.value?.refreshTable?.()
|
|
|
})
|
|
})
|
|
@@ -168,12 +167,12 @@
|
|
|
})
|
|
})
|
|
|
// 表格列配置 根据types 切换
|
|
// 表格列配置 根据types 切换
|
|
|
const columns = computed(() => {
|
|
const columns = computed(() => {
|
|
|
- return columnList.value[search.value.types]
|
|
|
|
|
|
|
+ return columnList.value[search.types]
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
const mobilePrimaryFields = computed(() => {
|
|
const mobilePrimaryFields = computed(() => {
|
|
|
return [
|
|
return [
|
|
|
- ...mobileList.value[search.value.types],
|
|
|
|
|
|
|
+ ...mobileList.value[search.types],
|
|
|
{
|
|
{
|
|
|
prop: 'more',
|
|
prop: 'more',
|
|
|
type: 'more',
|
|
type: 'more',
|
|
@@ -186,7 +185,7 @@
|
|
|
// 接口 根据types 切换
|
|
// 接口 根据types 切换
|
|
|
const listApi = computed(() => {
|
|
const listApi = computed(() => {
|
|
|
let other = {}
|
|
let other = {}
|
|
|
- switch (search.value.types) {
|
|
|
|
|
|
|
+ switch (search.types) {
|
|
|
case 1:
|
|
case 1:
|
|
|
other = {
|
|
other = {
|
|
|
mamType: 0,
|
|
mamType: 0,
|
|
@@ -205,7 +204,7 @@
|
|
|
break
|
|
break
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- return (params) => ibApi[apiList.value[search.value.types]]({ ...params, ...other })
|
|
|
|
|
|
|
+ return (params) => ibApi[apiList.value[search.types]]({ ...params, ...other })
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
const cancel = async (id) => {
|
|
const cancel = async (id) => {
|