|
@@ -42,6 +42,8 @@
|
|
|
</el-container>
|
|
|
</el-aside>
|
|
|
<div class="content-warp flex-column-page-wrap">
|
|
|
+ <!-- 公用搜索组件 -->
|
|
|
+ <LeSearchForm ref="searchForm" v-model:searchData="searchData" :forms="forms" :loading="tableOpts.options.loading"></LeSearchForm>
|
|
|
<!-- LeTable 组件使用 -->
|
|
|
<LeTable
|
|
|
ref="tableRef"
|
|
@@ -206,9 +208,40 @@ const getGroup = async () => {
|
|
|
|
|
|
// 左侧菜单点击
|
|
|
const leftTreeClick = data => {
|
|
|
- searchData.value = { ...searchData.value, data: { pid: data.id ? data.id : null } }
|
|
|
+ searchData.value = { ...searchData.value, pid: data.id ? data.id : null }
|
|
|
}
|
|
|
|
|
|
+// 表格搜索条件
|
|
|
+const forms = ref([
|
|
|
+ {
|
|
|
+ prop: 'name',
|
|
|
+ label: '名称:',
|
|
|
+ itemType: 'input',
|
|
|
+ placeholder: '请输入名称'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'code',
|
|
|
+ label: '编码:',
|
|
|
+ itemType: 'input',
|
|
|
+ placeholder: '请输入编码'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'status',
|
|
|
+ label: '状态:',
|
|
|
+ itemType: 'select',
|
|
|
+ placeholder: '请选择状态',
|
|
|
+ options: [
|
|
|
+ {
|
|
|
+ label: '禁用',
|
|
|
+ value: 0
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '正常',
|
|
|
+ value: 1
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+])
|
|
|
// table列表数据请求
|
|
|
const queryList = async () => {
|
|
|
const { options, searchParams } = tableOpts
|