feat:通知公告功能对接,客户端功能对接

This commit is contained in:
AN
2025-04-19 08:19:20 +08:00
parent 8c5ea2ae72
commit 52c08c1946
12 changed files with 1009 additions and 1 deletions

View File

@ -0,0 +1,73 @@
<script setup lang="ts">
import { $t } from '@/locales';
import { useNaiveForm } from '@/hooks/common/form';
defineOptions({
name: 'ClientSearch'
});
interface Emits {
(e: 'reset'): void;
(e: 'search'): void;
}
const emit = defineEmits<Emits>();
const { formRef, validate, restoreValidation } = useNaiveForm();
const model = defineModel<Api.System.ClientSearchParams>('model', { required: true });
async function reset() {
await restoreValidation();
emit('reset');
}
async function search() {
await validate();
emit('search');
}
</script>
<template>
<NCard :bordered="false" size="small" class="card-wrapper">
<NCollapse>
<NCollapseItem :title="$t('common.search')" name="user-search">
<NForm ref="formRef" :model="model" label-placement="left" :label-width="90">
<NGrid responsive="screen" item-responsive>
<NFormItemGi span="24 s:12 m:6" label="客户端key" path="clientKey" class="pr-24px">
<NInput v-model:value="model.clientKey" placeholder="请输入客户端key" />
</NFormItemGi>
<NFormItemGi span="24 s:12 m:6" label="客户端秘钥" path="clientSecret" class="pr-24px">
<NInput v-model:value="model.clientSecret" placeholder="请输入客户端秘钥" />
</NFormItemGi>
<NFormItemGi span="24 s:12 m:6" label="状态" path="status" class="pr-24px">
<DictSelect
v-model:value="model.status"
placeholder="请选择状态"
dict-code="sys_normal_disable"
clearable
/>
</NFormItemGi>
<NFormItemGi span="24" class="pr-24px">
<NSpace class="w-full" justify="end">
<NButton @click="reset">
<template #icon>
<icon-ic-round-refresh class="text-icon" />
</template>
{{ $t('common.reset') }}
</NButton>
<NButton type="primary" ghost @click="search">
<template #icon>
<icon-ic-round-search class="text-icon" />
</template>
{{ $t('common.search') }}
</NButton>
</NSpace>
</NFormItemGi>
</NGrid>
</NForm>
</NCollapseItem>
</NCollapse>
</NCard>
</template>
<style scoped></style>