Commit d1e62395 authored by Bill's avatar Bill

修改时间搜索bug

parent 2f56fc20
......@@ -47,7 +47,7 @@ const Advertisement = () => {
onFieldValueChange$('time'),
).subscribe(
fieldState => {
if(fieldState.value) {
if(fieldState.value != null) {
handleSearch({})
}
}
......@@ -65,8 +65,8 @@ const Advertisement = () => {
const postData = {
title: title || '',
status: status != 0 ? status : '',
startTime: st * 1000,
endTime: et * 1000,
startTime: st && st * 1000,
endTime: et && et * 1000,
current: 1,
pageSize: 10,
...params,
......
......@@ -5,6 +5,8 @@ import moment from 'moment';
import React from 'react';
import {ADVERTISE_COLUMN_TYPE} from '../../utils/utils';
const CustomTimeList = [{label: '全部', value: 0}].concat(TimeList.slice(1));
const columns = [
{title: 'ID', dataIndex: 'id'},
{ title: '标题',
......@@ -156,7 +158,7 @@ const advertisementSchema = {
'x-component': 'Select',
'x-component-props': {
placeholder: '发布时间(全部)',
options: TimeList,
options: CustomTimeList,
style: {
width: '160px',
}
......
......@@ -76,7 +76,7 @@ const Infomation = () => {
onFieldValueChange$('status'),
onFieldValueChange$('time')
).subscribe((state) => {
if(state.value) {
if(state.value != null) {
handleSearch({})
}
})
......@@ -96,8 +96,8 @@ const Infomation = () => {
title: title,
status: status != 0 ? status : '',
columnId: columnId,
startTime: st * 1000,
endTime: et * 1000,
startTime: st && st * 1000,
endTime: et && et * 1000,
current: 1,
pageSize: 10,
...params,
......
......@@ -4,6 +4,10 @@ import { timeRange } from '@/utils/index';
import { TimeList } from '@/pages/logistics/statusList';
import moment from 'moment';
import React from 'react';
console.log(TimeList);
const CustomTimeList = [{label: '全部', value: 0}].concat(TimeList.slice(1));
console.log(CustomTimeList);
const columns = [
{title: 'ID', dataIndex: 'id'},
......@@ -207,7 +211,7 @@ const infomationSchema = {
'x-component': 'Select',
'x-component-props': {
placeholder: '发布时间(全部)',
options: TimeList,
options: CustomTimeList,
style: {
width: '160px',
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment