瀏覽代碼

Merge remote-tracking branch 'origin/master'

ZaiZai 1 年之前
父節點
當前提交
8aa419ffa6
共有 2 個文件被更改,包括 13 次插入5 次删除
  1. 10 2
      src/views/system/role.vue
  2. 3 3
      src/views/system/user.vue

+ 10 - 2
src/views/system/role.vue

@@ -2,7 +2,7 @@
 <template>
     <div class="hc-layout-box role-page">
         <hc-card :scrollbar="false" action-size="lg">
-            <template #header>
+            <template #extra>
                 <el-button color="#20C98B" type="primary" @click="addClick">
                     <hc-icon name="add" class="text-white" />
                     <span class="text-white">新增</span>
@@ -13,6 +13,11 @@
                     <span class="text-white">删除</span>
                 </el-button>
             </template>
+            <template #header>
+                <div class="relative w-[300px]">
+                    <hc-search-input v-model="searchForm.roleName" color="#151921" text="搜索" @search="searchClick" />
+                </div>
+            </template>
             <hc-table
                 class="role-page-table"
                 is-check
@@ -97,7 +102,7 @@ const tableSelectionChange = (rows) => {
 }
 //搜索表单
 //搜索表单
-const searchForm = ref({ queryValue: null, current: 1, size: 20 })
+const searchForm = ref({ roleName: null, current: 1, size: 20 })
 const tableLoading = ref(false)
 const getTableData = async () => {
     tableLoading.value = true
@@ -112,6 +117,9 @@ const getTableData = async () => {
     }
     
 }
+const searchClick = () => {
+    getTableData()
+}
 //分页被点击
 const pageChange = ({ current, size }) => {
     searchForm.value.current = current

+ 3 - 3
src/views/system/user.vue

@@ -2,7 +2,7 @@
     <hc-card :scrollbar="false" action-size="lg" class="user-page">
         <template #header>
             <div class="relative w-[300px]">
-                <hc-search-input v-model="searchForm.queryValue" color="#151921" text="搜索" @search="searchClick" />
+                <hc-search-input v-model="searchForm.account" color="#151921" text="搜索" @search="searchClick" />
             </div>
         </template>
         <template #extra>
@@ -127,10 +127,10 @@ const tableSelectionChange = (rows) => {
     tableCheckedKeys.value = rows
 }
 //搜索表单
-const searchForm = ref({ queryValue: null, current: 1, size: 20, total: 0 })
+const searchForm = ref({ account: null, current: 1, size: 20, total: 0 })
 
 const searchClick = () => {
-
+    getTableData()
 }
 
 const getTableData = async () => {