订单列表页面接入,修改crud搜索支持radio-button类型

This commit is contained in:
2025-02-14 15:44:42 +08:00
parent 3cd59b4cd7
commit 9dc8e6b866
15 changed files with 856 additions and 8 deletions

View File

@@ -535,8 +535,8 @@ const pagination = reactive(
);
// 分页相关的请求参数
const request = props.contentConfig.request ?? {
pageName: "pageNum",
limitName: "pageSize",
pageName: "page",
limitName: "size",
};
const tableRef = ref<TableInstance>();

View File

@@ -5,7 +5,7 @@
shadow="never"
class="mb-[10px]"
>
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" :inline="inline">
<template v-for="(item, index) in formItems" :key="item.prop">
<el-form-item
v-show="isExpand ? true : index < showNumber"
@@ -36,6 +36,14 @@
@keyup.enter="handleQuery"
/>
</template>
<!-- radio-button radio按钮组 -->
<template v-if="item.type === 'radio-button'">
<el-radio-group v-model="queryParams[item.prop]" v-bind="item.attrs">
<template v-for="option in item.options" :key="option.value">
<el-radio-button :label="option.label" :value="option.value" />
</template>
</el-radio-group>
</template>
<!-- InputTag 标签输入框 -->
<template v-if="item.type === 'input-tag'">
<div class="flex-center">
@@ -131,6 +139,10 @@ const emit = defineEmits<{
}>();
const queryFormRef = ref<FormInstance>();
//form表单展示形式
const inline = ref<boolean>(
props.searchConfig.inline === undefined ? true : !!props.searchConfig.inline
);
// 是否显示
const visible = ref(true);
// 响应式的formItems

View File

@@ -29,10 +29,11 @@ export interface IOperatData {
export interface ISearchConfig {
// 页面名称(参与组成权限标识,如sys:user:xxx)
pageName: string;
inline?: Boolean;
// 表单项
formItems: Array<{
// 组件类型(如input,select等)
type?: "input" | "select" | "tree-select" | "date-picker" | "input-tag";
type?: "input" | "select" | "tree-select" | "date-picker" | "input-tag" | "radio-button";
// 标签文本
label: string;
// 标签提示