Skip to content

Commit e4c85b9

Browse files
committed
fix: reset search form
1 parent bfe1e2a commit e4c85b9

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

src/views/list/TableList.vue

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
<a-row :gutter="48">
66
<a-col :md="8" :sm="24">
77
<a-form-item label="规则编号">
8-
<a-input placeholder=""/>
8+
<a-input v-model="queryParam.id" placeholder=""/>
99
</a-form-item>
1010
</a-col>
1111
<a-col :md="8" :sm="24">
1212
<a-form-item label="使用状态">
13-
<a-select placeholder="请选择" default-value="0">
13+
<a-select v-model="queryParam.status" placeholder="请选择" default-value="0">
1414
<a-select-option value="0">全部</a-select-option>
1515
<a-select-option value="1">关闭</a-select-option>
1616
<a-select-option value="2">运行中</a-select-option>
@@ -20,17 +20,17 @@
2020
<template v-if="advanced">
2121
<a-col :md="8" :sm="24">
2222
<a-form-item label="调用次数">
23-
<a-input-number style="width: 100%"/>
23+
<a-input-number v-model="queryParam.callNo" style="width: 100%"/>
2424
</a-form-item>
2525
</a-col>
2626
<a-col :md="8" :sm="24">
2727
<a-form-item label="更新日期">
28-
<a-date-picker style="width: 100%" placeholder="请输入更新日期"/>
28+
<a-date-picker v-model="queryParam.date" style="width: 100%" placeholder="请输入更新日期"/>
2929
</a-form-item>
3030
</a-col>
3131
<a-col :md="8" :sm="24">
3232
<a-form-item label="使用状态">
33-
<a-select placeholder="请选择" default-value="0">
33+
<a-select v-model="queryParam.useStatus" placeholder="请选择" default-value="0">
3434
<a-select-option value="0">全部</a-select-option>
3535
<a-select-option value="1">关闭</a-select-option>
3636
<a-select-option value="2">运行中</a-select-option>
@@ -50,7 +50,7 @@
5050
<a-col :md="!advanced && 8 || 24" :sm="24">
5151
<span class="table-page-search-submitButtons" :style="advanced && { float: 'right', overflow: 'hidden' } || {} ">
5252
<a-button type="primary">查询</a-button>
53-
<a-button style="margin-left: 8px">重置</a-button>
53+
<a-button style="margin-left: 8px" @click="resetSearchForm">重置</a-button>
5454
<a @click="toggleAdvanced" style="margin-left: 8px">
5555
{{ advanced ? '收起' : '展开' }}
5656
<a-icon :type="advanced ? 'up' : 'down'"/>
@@ -182,6 +182,7 @@
182182
import STable from '@/components/table/'
183183
import ATextarea from "ant-design-vue/es/input/TextArea"
184184
import AInput from "ant-design-vue/es/input/Input"
185+
import moment from "moment"
185186
186187
import { getRoleList, getServiceList } from '@/api/manage'
187188
@@ -277,6 +278,12 @@
277278
toggleAdvanced () {
278279
this.advanced = !this.advanced
279280
},
281+
282+
resetSearchForm () {
283+
this.queryParam = {
284+
date: moment(new Date())
285+
}
286+
}
280287
},
281288
watch: {
282289
/*

0 commit comments

Comments
 (0)