mirror of https://gitee.com/xiaonuobase/snowy
【更新】所有列表上面重置按钮重置后刷新列表
parent
3ed834204b
commit
b546184f3f
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<a-card :bordered="false" :body-style="{ 'padding-bottom': '0px' }" class="mb-2">
|
||||
<a-form ref="formRef" name="advanced_search" :model="searchFormState" class="ant-advanced-search-form">
|
||||
<a-form ref="searchFormRef" name="advanced_search" :model="searchFormState" class="ant-advanced-search-form">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="8">
|
||||
<a-form-item label="关键字" name="searchKey">
|
||||
|
@ -15,7 +15,7 @@
|
|||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-button type="primary" @click="table.refresh(true)">查询</a-button>
|
||||
<a-button style="margin: 0 8px" @click="() => formRef.resetFields()">重置</a-button>
|
||||
<a-button style="margin: 0 8px" @click="reset">重置</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
|
@ -46,7 +46,7 @@
|
|||
import thirdApi from '@/api/auth/thirdApi'
|
||||
import tool from '@/utils/tool'
|
||||
let searchFormState = reactive({})
|
||||
const formRef = ref()
|
||||
const searchFormRef = ref()
|
||||
const table = ref()
|
||||
const toolConfig = { refresh: true, height: true, columnSetting: false, striped: false }
|
||||
const columns = [
|
||||
|
@ -87,6 +87,11 @@
|
|||
return res
|
||||
})
|
||||
}
|
||||
// 重置
|
||||
const reset = () => {
|
||||
searchFormRef.value.resetFields();
|
||||
table.value.refresh(true)
|
||||
}
|
||||
// 分类
|
||||
const categoryOptions = tool.dictList('THIRD_CATEGORY')
|
||||
</script>
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<template #icon><SearchOutlined /></template>
|
||||
查询
|
||||
</a-button>
|
||||
<a-button class="snowy-buttom-left" @click="() => searchFormRef.resetFields()">
|
||||
<a-button class="snowy-buttom-left" @click="reset">
|
||||
<template #icon><redo-outlined /></template>
|
||||
重置
|
||||
</a-button>
|
||||
|
@ -83,7 +83,7 @@
|
|||
</template>
|
||||
|
||||
<script setup name="bizOrg">
|
||||
import { message, Empty } from 'ant-design-vue'
|
||||
import { Empty } from 'ant-design-vue'
|
||||
import bizOrgApi from '@/api/biz/bizOrgApi'
|
||||
import Form from './form.vue'
|
||||
|
||||
|
@ -143,6 +143,11 @@
|
|||
return res
|
||||
})
|
||||
}
|
||||
// 重置
|
||||
const reset = () => {
|
||||
searchFormRef.value.resetFields();
|
||||
table.value.refresh(true)
|
||||
}
|
||||
// 加载左侧的树
|
||||
const loadTreeData = () => {
|
||||
bizOrgApi
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<template #icon><SearchOutlined /></template>
|
||||
查询
|
||||
</a-button>
|
||||
<a-button class="snowy-buttom-left" @click="() => searchFormRef.resetFields()">
|
||||
<a-button class="snowy-buttom-left" @click="reset">
|
||||
<template #icon><redo-outlined /></template>
|
||||
重置
|
||||
</a-button>
|
||||
|
@ -83,7 +83,7 @@
|
|||
</template>
|
||||
|
||||
<script setup name="bizPosition">
|
||||
import { message, Empty } from 'ant-design-vue'
|
||||
import { Empty } from 'ant-design-vue'
|
||||
import bizPositionApi from '@/api/biz/bizPositionApi'
|
||||
import bizOrgApi from '@/api/biz/bizOrgApi'
|
||||
import Form from './form.vue'
|
||||
|
@ -143,6 +143,11 @@
|
|||
return res
|
||||
})
|
||||
}
|
||||
// 重置
|
||||
const reset = () => {
|
||||
searchFormRef.value.resetFields();
|
||||
table.value.refresh(true)
|
||||
}
|
||||
// 加载左侧的树
|
||||
bizOrgApi
|
||||
.orgTree()
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<template #icon><SearchOutlined /></template>
|
||||
{{ $t('common.searchButton') }}
|
||||
</a-button>
|
||||
<a-button class="snowy-buttom-left" @click="() => searchFormRef.resetFields()">
|
||||
<a-button class="snowy-buttom-left" @click="reset">
|
||||
<template #icon><redo-outlined /></template>
|
||||
{{ $t('common.resetButton') }}
|
||||
</a-button>
|
||||
|
@ -227,6 +227,11 @@
|
|||
return res
|
||||
})
|
||||
}
|
||||
// 重置
|
||||
const reset = () => {
|
||||
searchFormRef.value.resetFields();
|
||||
table.value.refresh(true)
|
||||
}
|
||||
// 左侧树查询
|
||||
bizUserApi
|
||||
.userOrgTreeSelector()
|
||||
|
@ -334,6 +339,7 @@
|
|||
const exportBatchUser = (params) => {
|
||||
bizUserApi.userExport(params).then((res) => {
|
||||
downloadUtil.resultDownload(res)
|
||||
table.value.clearSelected()
|
||||
})
|
||||
}
|
||||
// 批量删除
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
<template #icon><SearchOutlined /></template>
|
||||
查询
|
||||
</a-button>
|
||||
<a-button class="snowy-buttom-left" @click="() => searchFormRef.resetFields()">
|
||||
<a-button class="snowy-buttom-left" @click="reset">
|
||||
<template #icon><redo-outlined /></template>
|
||||
重置
|
||||
</a-button>
|
||||
|
@ -106,6 +106,11 @@
|
|||
return res
|
||||
})
|
||||
}
|
||||
// 重置
|
||||
const reset = () => {
|
||||
searchFormRef.value.resetFields();
|
||||
table.value.refresh(true)
|
||||
}
|
||||
// 加载左侧的树
|
||||
const loadTreeData = () => {
|
||||
const param = {
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
<template #icon><SearchOutlined /></template>
|
||||
查询
|
||||
</a-button>
|
||||
<a-button class="snowy-buttom-left" @click="() => searchFormRef.resetFields()">
|
||||
<a-button class="snowy-buttom-left" @click="reset">
|
||||
<template #icon><redo-outlined /></template>
|
||||
重置
|
||||
</a-button>
|
||||
|
@ -105,6 +105,11 @@
|
|||
return res
|
||||
})
|
||||
}
|
||||
// 重置
|
||||
const reset = () => {
|
||||
searchFormRef.value.resetFields();
|
||||
table.value.refresh(true)
|
||||
}
|
||||
// 加载左侧的树
|
||||
const loadTreeData = () => {
|
||||
const param = {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<template #icon><SearchOutlined /></template>
|
||||
查询
|
||||
</a-button>
|
||||
<a-button class="snowy-buttom-left" @click="() => searchFormRef.resetFields()">
|
||||
<a-button class="snowy-buttom-left" @click="reset">
|
||||
<template #icon><redo-outlined /></template>
|
||||
重置
|
||||
</a-button>
|
||||
|
@ -131,13 +131,17 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 表格查询 返回 Promise 对象
|
||||
const loadData = (parameter) => {
|
||||
return emailApi.emailPage(Object.assign(parameter, searchFormState)).then((data) => {
|
||||
return data
|
||||
})
|
||||
}
|
||||
// 重置
|
||||
const reset = () => {
|
||||
searchFormRef.value.resetFields();
|
||||
table.value.refresh(true)
|
||||
}
|
||||
const engineOptions = tool.dictList('EMAIL_ENGINE')
|
||||
// 删除
|
||||
const deleteEmail = (record) => {
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<template #icon><SearchOutlined /></template>
|
||||
查询
|
||||
</a-button>
|
||||
<a-button class="snowy-buttom-left" @click="() => searchFormRef.resetFields()">
|
||||
<a-button class="snowy-buttom-left" @click="reset">
|
||||
<template #icon><redo-outlined /></template>
|
||||
重置
|
||||
</a-button>
|
||||
|
@ -99,7 +99,6 @@
|
|||
</template>
|
||||
|
||||
<script setup name="devFile">
|
||||
import { message } from 'ant-design-vue'
|
||||
import fileApi from '@/api/dev/fileApi'
|
||||
import uploadForm from './uploadForm.vue'
|
||||
import detail from './detail.vue'
|
||||
|
@ -169,6 +168,11 @@
|
|||
return data
|
||||
})
|
||||
}
|
||||
// 重置
|
||||
const reset = () => {
|
||||
searchFormRef.value.resetFields();
|
||||
table.value.refresh(true)
|
||||
}
|
||||
// 删除
|
||||
const deleteFile = (record) => {
|
||||
let params = [
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<a-card :bordered="false" :body-style="{ 'padding-bottom': '0px' }" class="mb-2">
|
||||
<a-form ref="formRef" name="advanced_search" :model="searchFormState" class="ant-advanced-search-form">
|
||||
<a-form ref="searchFormRef" name="advanced_search" :model="searchFormState" class="ant-advanced-search-form">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="6">
|
||||
<a-form-item label="关键字" name="searchKey">
|
||||
|
@ -19,7 +19,7 @@
|
|||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-button type="primary" @click="table.refresh(true)">查询</a-button>
|
||||
<a-button style="margin: 0 8px" @click="() => formRef.resetFields()">重置</a-button>
|
||||
<a-button style="margin: 0 8px" @click="reset">重置</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
|
@ -78,12 +78,11 @@
|
|||
</template>
|
||||
|
||||
<script setup name="devJob">
|
||||
import { message } from 'ant-design-vue'
|
||||
import tool from '@/utils/tool'
|
||||
import Form from './form.vue'
|
||||
import jobApi from '@/api/dev/jobApi'
|
||||
let searchFormState = reactive({})
|
||||
const formRef = ref()
|
||||
const searchFormRef = ref()
|
||||
const table = ref()
|
||||
let form = ref()
|
||||
const statusLoading = ref(false)
|
||||
|
@ -146,6 +145,11 @@
|
|||
return res
|
||||
})
|
||||
}
|
||||
// 重置
|
||||
const reset = () => {
|
||||
searchFormRef.value.resetFields();
|
||||
table.value.refresh(true)
|
||||
}
|
||||
// 启停
|
||||
const editJobStatus = (record) => {
|
||||
statusLoading.value = true
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<template #icon><SearchOutlined /></template>
|
||||
查询
|
||||
</a-button>
|
||||
<a-button class="snowy-buttom-left" @click="() => searchFormRef.resetFields()">
|
||||
<a-button class="snowy-buttom-left" @click="reset">
|
||||
<template #icon><redo-outlined /></template>
|
||||
重置
|
||||
</a-button>
|
||||
|
@ -53,7 +53,6 @@
|
|||
</template>
|
||||
|
||||
<script setup name="devMessage">
|
||||
import { message } from 'ant-design-vue'
|
||||
import messageApi from '@/api/dev/messageApi'
|
||||
import Form from './form.vue'
|
||||
import detail from './detail.vue'
|
||||
|
@ -110,6 +109,11 @@
|
|||
return data
|
||||
})
|
||||
}
|
||||
// 重置
|
||||
const reset = () => {
|
||||
searchFormRef.value.resetFields();
|
||||
table.value.refresh(true)
|
||||
}
|
||||
// 删除
|
||||
const deleteMessage = (record) => {
|
||||
let params = [
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<template #icon><SearchOutlined /></template>
|
||||
查询
|
||||
</a-button>
|
||||
<a-button class="snowy-buttom-left" @click="() => searchFormRef.resetFields()">
|
||||
<a-button class="snowy-buttom-left" @click="reset">
|
||||
<template #icon><redo-outlined /></template>
|
||||
重置
|
||||
</a-button>
|
||||
|
@ -69,7 +69,6 @@
|
|||
</template>
|
||||
|
||||
<script setup name="devSms">
|
||||
import { message } from 'ant-design-vue'
|
||||
import smsApi from '@/api/dev/smsApi'
|
||||
import Form from './form.vue'
|
||||
import detail from './detail.vue'
|
||||
|
@ -139,6 +138,11 @@
|
|||
return data
|
||||
})
|
||||
}
|
||||
// 重置
|
||||
const reset = () => {
|
||||
searchFormRef.value.resetFields();
|
||||
table.value.refresh(true)
|
||||
}
|
||||
const engineOptions = tool.dictList('SMS_ENGINE')
|
||||
// 删除
|
||||
const deleteSms = (record) => {
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<a-space>
|
||||
<a-input v-model:value="searchFormState.searchKey" placeholder="请输入模块名称关键词"></a-input>
|
||||
<a-button type="primary" @click="table.refresh(true)">查询</a-button>
|
||||
<a-button style="margin: 0 8px" @click="() => searchFormRef.resetFields()">重置</a-button>
|
||||
<a-button style="margin: 0 8px" @click="reset">重置</a-button>
|
||||
</a-space>
|
||||
</a-form-item>
|
||||
</a-space>
|
||||
|
@ -183,6 +183,11 @@
|
|||
})
|
||||
}
|
||||
}
|
||||
// 重置
|
||||
const reset = () => {
|
||||
searchFormRef.value.resetFields();
|
||||
table.value.refresh(true)
|
||||
}
|
||||
// 切换模块标签查询菜单列表
|
||||
const moduleClock = (value) => {
|
||||
searchFormState.module = value
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-button type="primary" @click="table.refresh(true)">查询</a-button>
|
||||
<a-button style="margin: 0 8px" @click="() => formRef.resetFields()">重置</a-button>
|
||||
<a-button style="margin: 0 8px" @click="reset">重置</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
|
@ -56,7 +56,6 @@
|
|||
</template>
|
||||
|
||||
<script setup name="mobileModule">
|
||||
import { message } from 'ant-design-vue'
|
||||
import Form from './form.vue'
|
||||
import moduleApi from '@/api/mobile/resource/moduleApi'
|
||||
let searchFormState = reactive({})
|
||||
|
@ -110,11 +109,10 @@
|
|||
return res
|
||||
})
|
||||
}
|
||||
// 查询
|
||||
const onSearch = () => {
|
||||
if (searchFormState.searchKey) {
|
||||
table.value.refresh(true)
|
||||
}
|
||||
// 重置
|
||||
const reset = () => {
|
||||
formRef.value.resetFields();
|
||||
table.value.refresh(true)
|
||||
}
|
||||
// 删除
|
||||
const deleteModule = (record) => {
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<template #icon><SearchOutlined /></template>
|
||||
查询
|
||||
</a-button>
|
||||
<a-button class="snowy-buttom-left" @click="() => searchFormRef.resetFields()">
|
||||
<a-button class="snowy-buttom-left" @click="reset">
|
||||
<template #icon><redo-outlined /></template>
|
||||
重置
|
||||
</a-button>
|
||||
|
@ -132,6 +132,11 @@
|
|||
return res
|
||||
})
|
||||
}
|
||||
// 重置
|
||||
const reset = () => {
|
||||
searchFormRef.value.resetFields();
|
||||
table.value.refresh(true)
|
||||
}
|
||||
// 加载左侧的树
|
||||
const loadTreeData = () => {
|
||||
orgApi.orgTree().then((res) => {
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<template #icon><SearchOutlined /></template>
|
||||
查询
|
||||
</a-button>
|
||||
<a-button class="snowy-buttom-left" @click="() => searchFormRef.resetFields()">
|
||||
<a-button class="snowy-buttom-left" @click="reset">
|
||||
<template #icon><redo-outlined /></template>
|
||||
重置
|
||||
</a-button>
|
||||
|
@ -133,6 +133,11 @@
|
|||
return res
|
||||
})
|
||||
}
|
||||
// 重置
|
||||
const reset = () => {
|
||||
searchFormRef.value.resetFields();
|
||||
table.value.refresh(true)
|
||||
}
|
||||
// 加载左侧的树
|
||||
orgApi.orgTree().then((res) => {
|
||||
cardLoading.value = false
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { message } from 'ant-design-vue'
|
||||
import fieldApi from '@/api/sys/resource/fieldApi'
|
||||
import Form from './form.vue'
|
||||
const columns = [
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-button type="primary" @click="table.refresh(true)">查询</a-button>
|
||||
<a-button style="margin: 0 8px" @click="() => formRef.resetFields()">重置</a-button>
|
||||
<a-button style="margin: 0 8px" @click="reset">重置</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
|
@ -56,7 +56,6 @@
|
|||
</template>
|
||||
|
||||
<script setup name="sysModule">
|
||||
import { message } from 'ant-design-vue'
|
||||
import Form from './form.vue'
|
||||
import moduleApi from '@/api/sys/resource/moduleApi'
|
||||
let searchFormState = reactive({})
|
||||
|
@ -110,6 +109,11 @@
|
|||
return res
|
||||
})
|
||||
}
|
||||
// 重置
|
||||
const reset = () => {
|
||||
formRef.value.resetFields();
|
||||
table.value.refresh(true)
|
||||
}
|
||||
// 删除
|
||||
const deleteModule = (record) => {
|
||||
let params = [
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-button type="primary" html-type="submit" @click="table.refresh()">查询</a-button>
|
||||
<a-button style="margin: 0 8px" @click="() => formRef.resetFields()">重置</a-button>
|
||||
<a-button style="margin: 0 8px" @click="reset">重置</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
|
@ -164,6 +164,11 @@
|
|||
return res
|
||||
})
|
||||
}
|
||||
// 重置
|
||||
const reset = () => {
|
||||
formRef.value.resetFields();
|
||||
table.value.refresh(true)
|
||||
}
|
||||
// 删除
|
||||
const removeSpa = (record) => {
|
||||
let params = [
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<template #icon><SearchOutlined /></template>
|
||||
查询
|
||||
</a-button>
|
||||
<a-button class="snowy-buttom-left" @click="() => searchFormRef.resetFields()">
|
||||
<a-button class="snowy-buttom-left" @click="reset">
|
||||
<template #icon><redo-outlined /></template>
|
||||
重置
|
||||
</a-button>
|
||||
|
@ -179,6 +179,11 @@
|
|||
return res
|
||||
})
|
||||
}
|
||||
// 重置
|
||||
const reset = () => {
|
||||
searchFormRef.value.resetFields();
|
||||
table.value.refresh(true)
|
||||
}
|
||||
// 加载左侧的树
|
||||
orgApi.orgTree().then((res) => {
|
||||
cardLoading.value = false
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<template #icon><SearchOutlined /></template>
|
||||
{{ $t('common.searchButton') }}
|
||||
</a-button>
|
||||
<a-button class="snowy-buttom-left" @click="() => searchFormRef.resetFields()">
|
||||
<a-button class="snowy-buttom-left" @click="reset">
|
||||
<template #icon><redo-outlined /></template>
|
||||
{{ $t('common.resetButton') }}
|
||||
</a-button>
|
||||
|
@ -262,6 +262,11 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
// 重置
|
||||
const reset = () => {
|
||||
searchFormRef.value.resetFields();
|
||||
table.value.refresh(true)
|
||||
}
|
||||
// 点击树查询
|
||||
const treeSelect = (selectedKeys) => {
|
||||
if (selectedKeys.length > 0) {
|
||||
|
@ -328,8 +333,10 @@
|
|||
}
|
||||
// 批量导出
|
||||
const exportBatchUser = (params) => {
|
||||
console.log(JSON.stringify(params))
|
||||
userApi.userExport(params).then((res) => {
|
||||
downloadUtil.resultDownload(res)
|
||||
table.value.clearSelected()
|
||||
})
|
||||
}
|
||||
// 批量删除
|
||||
|
|
Loading…
Reference in New Issue