feat:每日菜谱只筛选食堂

This commit is contained in:
dzc committed 2025-03-23 15:30:24 +08:00
1 parent 5bb6c9731b
commit ef7f19c07e
2 files changed
+4 -1

No files matched your search

+3
View File
@@ -32,9 +32,11 @@ const selectId = defineModel()
export type Props = { export type Props = {
placeholder?: string placeholder?: string
apiParams?: any
} }
const props = withDefaults(defineProps<Props>(), { const props = withDefaults(defineProps<Props>(), {
placeholder: "请选择", placeholder: "请选择",
apiParams: {},
}) })
const queryForm = reactive<any>({ const queryForm = reactive<any>({
@@ -64,6 +66,7 @@ async function getOptions() {
state.loading = true state.loading = true
const _pa = { const _pa = {
...queryForm, ...queryForm,
...props.apiParams,
} }
const { data } = await mchApi.select(_pa) const { data } = await mchApi.select(_pa)
state.options = data.records ?? [] state.options = data.records ?? []
+1 -1
View File
@@ -1,7 +1,7 @@
<template> <template>
<div class="layout-padding" v-loading="loading"> <div class="layout-padding" v-loading="loading">
<el-form-item label="商户" prop="merchantId" class="w-60 ml-10 my-6"> <el-form-item label="商户" prop="merchantId" class="w-60 ml-10 my-6">
<select-mch v-model="merchantId" /> <select-mch v-model="merchantId" :apiParams="{ types: '1' }" />
</el-form-item> </el-form-item>
<h1 class="mx-auto text-5xl mt-[-40px]">今日菜谱</h1> <h1 class="mx-auto text-5xl mt-[-40px]">今日菜谱</h1>