From 5ddef0a940f499768ac9cae14633645a8621079c Mon Sep 17 00:00:00 2001
From: Zhu Zhonghua <zhonghua@qq.com>
Date: 星期五, 16 五月 2025 13:32:26 +0800
Subject: [PATCH] 修改right toolbar
---
src/views/mainPlan/platePlan/index.vue | 15 +++++++--------
src/components/RightToolbar/index.vue | 22 ++++++++++++++++++----
2 files changed, 25 insertions(+), 12 deletions(-)
diff --git a/src/components/RightToolbar/index.vue b/src/components/RightToolbar/index.vue
index ef4281c..2ccb0d1 100644
--- a/src/components/RightToolbar/index.vue
+++ b/src/components/RightToolbar/index.vue
@@ -1,10 +1,16 @@
<template>
<div class="top-right-btn" :style="style">
<el-row>
- <el-tooltip class="item" effect="dark" :content="showSearch ? $t('common.common.hideSearch') : $t('common.common.showSearch')" placement="top" v-if="search">
- <el-button circle icon="Search" @click="toggleSearch()" />
+ <el-tooltip class="item" effect="dark" :content="$t('common.common.query')" placement="top" v-if="search">
+ <el-button circle icon="search" type="primary" @click="queryData()" />
</el-tooltip>
- <el-tooltip class="item" effect="dark" :content="$t('common.common.refresh')" placement="top">
+ <el-tooltip class="item" effect="dark" :content="$t('common.common.reset')" placement="top" v-if="search">
+ <el-button circle icon="refresh-right" @click="resetData()" />
+ </el-tooltip>
+ <el-tooltip class="item" effect="dark" :content="showSearch ? $t('common.common.hideSearch') : $t('common.common.showSearch')" placement="top" v-if="search">
+ <el-button circle :icon="showSearch ? 'arrow-up' : 'arrow-down'" @click="toggleSearch()" />
+ </el-tooltip>
+ <el-tooltip class="item" effect="dark" :content="$t('common.common.refresh')" placement="top" v-if="!search">
<el-button circle icon="Refresh" @click="refresh()" />
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="$t('common.common.column')" placement="top" v-if="columns">
@@ -62,7 +68,7 @@
},
})
-const emits = defineEmits(['update:showSearch', 'queryTable']);
+const emits = defineEmits(['update:showSearch', 'queryTable', 'refreshTable', 'resetTable']);
// 鏄鹃殣鏁版嵁
const value = ref([]);
@@ -86,9 +92,17 @@
// 鍒锋柊
function refresh() {
+ emits("refreshTable");
+}
+
+function queryData() {
emits("queryTable");
}
+function resetData() {
+ emits("resetTable");
+}
+
// 鍙充晶鍒楄〃鍏冪礌鍙樺寲
function dataChange(data) {
for (let item in props.columns) {
diff --git a/src/views/mainPlan/platePlan/index.vue b/src/views/mainPlan/platePlan/index.vue
index 0cd0de8..24b538a 100644
--- a/src/views/mainPlan/platePlan/index.vue
+++ b/src/views/mainPlan/platePlan/index.vue
@@ -9,7 +9,7 @@
label-position="left"
>
<el-row :gutter="20">
- <el-col :span="8">
+ <el-col :span="6">
<el-form-item
:label="$t('plan.query.daterangePlanStartDay')"
:style="{ width: '100%' }"
@@ -25,7 +25,7 @@
></el-date-picker>
</el-form-item>
</el-col>
- <el-col :span="8">
+ <el-col :span="6">
<el-form-item
:style="{ width: '100%' }"
:label="$t('plan.query.daterangePlanEndDay')"
@@ -40,7 +40,7 @@
></el-date-picker>
</el-form-item>
</el-col>
- <el-col :span="8">
+ <el-col :span="6">
<el-form-item
:style="{ width: '100%' }"
:label="$t('plan.query.documentNumber')"
@@ -54,8 +54,6 @@
/>
</el-form-item>
</el-col>
- </el-row>
- <el-row>
<el-col :span="6">
<el-form-item :style="{ width: '100%' }" :label="$t('plan.query.customer')" prop="customer">
<el-input
@@ -66,7 +64,7 @@
/>
</el-form-item>
</el-col>
- <el-col :span="18" style="text-align: right">
+ <!-- <el-col :span="24" style="text-align: right">
<el-form-item class="column-with-margin">
<el-button type="primary" icon="Search" @click="handleQuery">{{
$t("common.common.query")
@@ -75,7 +73,7 @@
$t("common.common.reset")
}}</el-button>
</el-form-item>
- </el-col>
+ </el-col> -->
</el-row>
</el-form>
<!-- </el-row> -->
@@ -124,7 +122,8 @@
</el-col>
<right-toolbar
v-model:showSearch="showSearch"
- @queryTable="getList"
+ @queryTable="handleQuery"
+ @resetTable="resetQuery"
></right-toolbar>
</el-row>
--
Gitblit v1.9.3