Browse Source

增加重置搜索条件功能

main
piexlmax 3 years ago
parent
commit
4d8fcbd08b
  1. 4
      server/resource/template/web/table.vue.tpl
  2. 6
      web/src/view/superAdmin/api/api.vue
  3. 4
      web/src/view/superAdmin/dictionary/sysDictionary.vue
  4. 4
      web/src/view/superAdmin/dictionary/sysDictionaryDetail.vue
  5. 4
      web/src/view/superAdmin/operation/sysOperationRecord.vue

4
server/resource/template/web/table.vue.tpl

@ -23,6 +23,7 @@
</el-form-item>{{ end }}{{ end }}{{ end }} </el-form-item>{{ end }}{{ end }}{{ end }}
<el-form-item> <el-form-item>
<el-button size="mini" type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button> <el-button size="mini" type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
<el-button size="mini" icon="el-icon-refresh" @click="onReset">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -177,6 +178,9 @@ export default {
{{- end }} {{- end }}
}, },
methods: { methods: {
onReset() {
this.searchInfo = {}
},
// 条件搜索前端看此方法 // 条件搜索前端看此方法
onSubmit() { onSubmit() {
this.page = 1 this.page = 1

6
web/src/view/superAdmin/api/api.vue

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<div class="gva-search-box"> <div class="gva-search-box">
<el-form :inline="true" :model="searchInfo">
<el-form ref="searchForm" :inline="true" :model="searchInfo">
<el-form-item label="路径"> <el-form-item label="路径">
<el-input v-model="searchInfo.path" placeholder="路径" /> <el-input v-model="searchInfo.path" placeholder="路径" />
</el-form-item> </el-form-item>
@ -23,6 +23,7 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button size="mini" type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button> <el-button size="mini" type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
<el-button size="mini" icon="el-icon-refresh" @click="onReset">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -233,6 +234,9 @@ export default {
} }
this.getTableData() this.getTableData()
}, },
onReset() {
this.searchInfo = {}
},
// //
onSubmit() { onSubmit() {
this.page = 1 this.page = 1

4
web/src/view/superAdmin/dictionary/sysDictionary.vue

@ -19,6 +19,7 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button size="mini" type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button> <el-button size="mini" type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
<el-button size="mini" icon="el-icon-refresh" @click="onReset">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -175,6 +176,9 @@ export default {
} }
}) })
}, },
onReset() {
this.searchInfo = {}
},
// //
onSubmit() { onSubmit() {
this.page = 1 this.page = 1

4
web/src/view/superAdmin/dictionary/sysDictionaryDetail.vue

@ -16,6 +16,7 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button size="mini" type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button> <el-button size="mini" type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
<el-button size="mini" icon="el-icon-refresh" @click="onReset">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -165,6 +166,9 @@ export default {
this.getTableData() this.getTableData()
}, },
methods: { methods: {
onReset() {
this.searchInfo = {}
},
// //
onSubmit() { onSubmit() {
this.page = 1 this.page = 1

4
web/src/view/superAdmin/operation/sysOperationRecord.vue

@ -13,6 +13,7 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button size="mini" type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button> <el-button size="mini" type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
<el-button size="mini" icon="el-icon-refresh" @click="onReset">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -151,6 +152,9 @@ export default {
this.getTableData() this.getTableData()
}, },
methods: { methods: {
onReset() {
this.searchInfo = {}
},
// //
onSubmit() { onSubmit() {
this.page = 1 this.page = 1

Loading…
Cancel
Save