feat(sj_1.0.0): 组导出支持条件筛选导出全部
This commit is contained in:
parent
132374eb06
commit
eb0ed778b1
@ -525,7 +525,7 @@ const local: App.I18n.Schema = {
|
||||
form: {
|
||||
groupName: 'Please enter group name',
|
||||
token: 'Please enter Token',
|
||||
groupStatus: 'Group status',
|
||||
groupStatus: 'Please select group status',
|
||||
description: 'Please enter description',
|
||||
idGeneratorMode: 'Please select ID generator mode',
|
||||
groupPartition: 'Please select Group partition',
|
||||
|
8
src/typings/api.d.ts
vendored
8
src/typings/api.d.ts
vendored
@ -378,9 +378,15 @@ declare namespace Api {
|
||||
|
||||
/** groupConfig search params */
|
||||
type GroupConfigSearchParams = CommonType.RecordNullable<
|
||||
Pick<Api.GroupConfig.GroupConfig, 'groupName'> & CommonSearchParams
|
||||
Pick<Api.GroupConfig.GroupConfig, 'groupName' | 'groupStatus'> & CommonSearchParams
|
||||
>;
|
||||
|
||||
/** export groupConfig */
|
||||
type ExportGroupConfig = Common.CommonRecord<{
|
||||
groupIds: string[];
|
||||
}> &
|
||||
CommonType.RecordNullable<Pick<Api.GroupConfig.GroupConfig, 'groupName' | 'groupStatus'>>;
|
||||
|
||||
type GroupConfigRequestVO = {
|
||||
groupName: string;
|
||||
groupStatus: GroupStatusType;
|
||||
|
@ -161,8 +161,16 @@ function edit(id: string) {
|
||||
handleEdit(id);
|
||||
}
|
||||
|
||||
function body(): Api.GroupConfig.ExportGroupConfig {
|
||||
return {
|
||||
groupName: searchParams.groupName,
|
||||
groupStatus: searchParams.groupStatus,
|
||||
groupIds: checkedRowKeys.value
|
||||
};
|
||||
}
|
||||
|
||||
function handleExport() {
|
||||
downloadFetch('/group/export', checkedRowKeys.value, $t('page.groupConfig.title'));
|
||||
downloadFetch('/group/export', body(), $t('page.groupConfig.title'));
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -66,15 +66,6 @@ type RuleKey = Extract<
|
||||
'groupName' | 'token' | 'groupStatus' | 'idGeneratorMode' | 'initScene' | 'groupPartition'
|
||||
>;
|
||||
|
||||
// const rules: Record<RuleKey, App.Global.FormRule> = {
|
||||
// groupName: defaultRequiredRule,
|
||||
// token: defaultRequiredRule,
|
||||
// groupStatus: defaultRequiredRule,
|
||||
// idGeneratorMode: defaultRequiredRule,
|
||||
// initScene: defaultRequiredRule,
|
||||
// groupPartition: defaultRequiredRule
|
||||
// };
|
||||
|
||||
const rules = {
|
||||
groupName: [
|
||||
defaultRequiredRule,
|
||||
|
@ -1,5 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { $t } from '@/locales';
|
||||
import { translateOptions } from '@/utils/common';
|
||||
import { groupConfigStatusOptions } from '@/constants/business';
|
||||
|
||||
defineOptions({
|
||||
name: 'GroupSearch'
|
||||
@ -28,6 +30,13 @@ function search() {
|
||||
<NFormItemGi span="24 s:12 m:6" :label="$t('page.groupConfig.groupName')" path="groupName" class="pr-24px">
|
||||
<NInput v-model:value="model.groupName" :placeholder="$t('page.groupConfig.form.groupName')" />
|
||||
</NFormItemGi>
|
||||
<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)"
|
||||
/>
|
||||
</NFormItemGi>
|
||||
</SearchForm>
|
||||
</template>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user