2024-04-17 23:48:25 +08:00
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { $t } from '@/locales';
|
2024-05-29 18:37:22 +08:00
|
|
|
import { translateOptions } from '@/utils/common';
|
|
|
|
|
import { groupConfigStatusOptions } from '@/constants/business';
|
2024-04-17 23:48:25 +08:00
|
|
|
|
|
|
|
|
defineOptions({
|
2024-04-22 22:37:15 +08:00
|
|
|
name: 'GroupSearch'
|
2024-04-17 23:48:25 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
interface Emits {
|
|
|
|
|
(e: 'reset'): void;
|
|
|
|
|
(e: 'search'): void;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const emit = defineEmits<Emits>();
|
|
|
|
|
|
|
|
|
|
const model = defineModel<Api.GroupConfig.GroupConfigSearchParams>('model', { required: true });
|
|
|
|
|
|
2024-04-18 09:47:26 +08:00
|
|
|
function reset() {
|
2024-04-17 23:48:25 +08:00
|
|
|
emit('reset');
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-18 09:47:26 +08:00
|
|
|
function search() {
|
2024-04-17 23:48:25 +08:00
|
|
|
emit('search');
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
2024-04-18 09:47:26 +08:00
|
|
|
<SearchForm :model="model" @search="search" @reset="reset">
|
2024-04-22 15:17:12 +08:00
|
|
|
<NFormItemGi span="24 s:12 m:6" :label="$t('page.groupConfig.groupName')" path="groupName" class="pr-24px">
|
2024-06-19 17:32:29 +08:00
|
|
|
<NInput v-model:value="model.groupName" :placeholder="$t('page.groupConfig.form.groupName')" clearable />
|
2024-04-18 09:47:26 +08:00
|
|
|
</NFormItemGi>
|
2024-05-29 18:37:22 +08:00
|
|
|
<NFormItemGi span="24 s:12 m:6" :label="$t('page.groupConfig.groupStatus')" path="groupStatus" class="pr-24px">
|
|
|
|
|
<NSelect
|
|
|
|
|
v-model:value="model.groupStatus"
|
|
|
|
|
:placeholder="$t('page.groupConfig.form.groupStatus')"
|
|
|
|
|
:options="translateOptions(groupConfigStatusOptions)"
|
2024-06-01 14:13:39 +08:00
|
|
|
clearable
|
2024-05-29 18:37:22 +08:00
|
|
|
/>
|
|
|
|
|
</NFormItemGi>
|
2024-04-18 09:47:26 +08:00
|
|
|
</SearchForm>
|
2024-04-17 23:48:25 +08:00
|
|
|
</template>
|
|
|
|
|
|
2024-04-18 09:47:26 +08:00
|
|
|
<style scoped></style>
|