|
@@ -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
|