Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 154bcfb4
authored
Nov 07, 2023
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
SearchResetButton组件相关优化
1 parent
9365e13b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
8 deletions
vue3-lw-pc/src/components/RequestChartTable.vue
vue3-lw-pc/src/components/SearchResetButton.vue
vue3-lw-pc/src/views/system/exception/index.vue
vue3-lw-pc/src/components/RequestChartTable.vue
View file @
154bcfb
...
@@ -122,6 +122,27 @@ export default {
...
@@ -122,6 +122,27 @@ export default {
this
.
loading
=
false
this
.
loading
=
false
})
})
},
},
// (批量)删除
remove
(
remove
)
{
this
.
$confirm
(
'是否确认删除?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
})
.
then
(()
=>
{
this
.
loading
=
true
return
remove
().
then
((
res
)
=>
{
this
.
msgSuccess
(
'删除成功'
)
this
.
getList
()
})
})
.
catch
((
e
)
=>
{
console
.
error
(
e
)
})
.
finally
(()
=>
{
this
.
loading
=
false
})
},
},
},
}
}
</
script
>
</
script
>
...
@@ -131,7 +152,7 @@ export default {
...
@@ -131,7 +152,7 @@ export default {
<!-- 顶部查询框 -->
<!-- 顶部查询框 -->
<el-form
v-if=
"$slots.query"
:model=
"query"
ref=
"queryForm"
inline
class=
"top-search"
>
<el-form
v-if=
"$slots.query"
:model=
"query"
ref=
"queryForm"
inline
class=
"top-search"
>
<slot
name=
"query"
v-bind=
"
{ query }">
</slot>
<slot
name=
"query"
v-bind=
"
{ query }">
</slot>
<SearchResetButton
:search=
"getList"
:reset=
"() =>
$refs.queryForm.resetFields()"
></SearchResetButton>
<SearchResetButton
@
search=
"getList(1)"
@
reset=
"
$refs.queryForm.resetFields()"
></SearchResetButton>
</el-form>
</el-form>
<div
:class=
"$slots.query && 'g-card'"
>
<div
:class=
"$slots.query && 'g-card'"
>
...
@@ -147,7 +168,7 @@ export default {
...
@@ -147,7 +168,7 @@ export default {
<el-form
v-if=
"$slots.queryMiddle"
:model=
"query"
ref=
"queryFormMiddle"
inline
class=
"query-wrap"
>
<el-form
v-if=
"$slots.queryMiddle"
:model=
"query"
ref=
"queryFormMiddle"
inline
class=
"query-wrap"
>
<slot
name=
"queryMiddle"
v-bind=
"
{ query }">
</slot>
<slot
name=
"queryMiddle"
v-bind=
"
{ query }">
</slot>
<SearchResetButton
:search=
"getList"
:reset=
"() =>
$refs.queryFormMiddle.resetFields()"
></SearchResetButton>
<SearchResetButton
@
search=
"getList(1)"
@
reset=
"
$refs.queryFormMiddle.resetFields()"
></SearchResetButton>
</el-form>
</el-form>
<!-- 操作slot -->
<!-- 操作slot -->
...
...
vue3-lw-pc/src/components/SearchResetButton.vue
View file @
154bcfb
<!-- 搜索查询、重置按钮 -->
<!-- 搜索查询、重置按钮 -->
<
script
>
<
script
>
export
default
{
export
default
{
props
:
{
search
:
{
type
:
Function
},
reset
:
{
type
:
Function
}
},
// props: {
},
// data() {
// data() {
// return {}
// return {}
// },
// },
...
@@ -15,8 +15,8 @@ export default {
...
@@ -15,8 +15,8 @@ export default {
<
template
>
<
template
>
<div
class=
"SearchClearButton bfc-d"
>
<div
class=
"SearchClearButton bfc-d"
>
<el-button
type=
"primary"
@
click=
"
search(1
)"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"
$emit('search'
)"
>
查询
</el-button>
<el-button
@
click=
"
reset(), search(1
)"
>
重置
</el-button>
<el-button
@
click=
"
$emit('reset'
)"
>
重置
</el-button>
</div>
</div>
</
template
>
</
template
>
...
...
vue3-lw-pc/src/views/system/exception/index.vue
View file @
154bcfb
...
@@ -23,9 +23,7 @@ let visible = ref(false)
...
@@ -23,9 +23,7 @@ let visible = ref(false)
start-placeholder=
"开始日期"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
></el-date-picker>
end-placeholder=
"结束日期"
></el-date-picker>
</el-form-item>
</el-form-item>
<SearchResetButton
<SearchResetButton
@
search=
"$refs.table.getList(1)"
@
reset=
"$refs.queryForm.resetFields()"
></SearchResetButton>
:search=
"() => $refs.table.getList()"
:reset=
"() => $refs.queryForm.resetFields()"
></SearchResetButton>
</el-form>
</el-form>
<RequestChartTable
ref=
"table"
:request=
"getList"
:dealQueryFun=
"(params) => Object.assign(params, query)"
>
<RequestChartTable
ref=
"table"
:request=
"getList"
:dealQueryFun=
"(params) => Object.assign(params, query)"
>
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment