合并字典bug修复
This commit is contained in:
commit
0d046eae37
@ -71,16 +71,6 @@ export const generatedRoutes: GeneratedRoute[] = [
|
||||
keepAlive: false
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: 'dictionary_data',
|
||||
path: '/dictionary/data',
|
||||
component: 'view.dictionary_data',
|
||||
meta: {
|
||||
title: 'dictionary_data',
|
||||
i18nKey: 'route.dictionary_data',
|
||||
icon: 'carbon:batch-job'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'dictionary_type',
|
||||
path: '/dictionary/type',
|
||||
@ -90,6 +80,16 @@ export const generatedRoutes: GeneratedRoute[] = [
|
||||
i18nKey: 'route.dictionary_type',
|
||||
icon: 'octicon:tasklist'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'dictionary_data',
|
||||
path: '/dictionary/data',
|
||||
component: 'view.dictionary_data',
|
||||
meta: {
|
||||
title: 'dictionary_data',
|
||||
i18nKey: 'route.dictionary_data',
|
||||
icon: 'carbon:batch-job'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
6
src/typings/api.d.ts
vendored
6
src/typings/api.d.ts
vendored
@ -1369,9 +1369,9 @@ declare namespace Api {
|
||||
// type CategoryType = '1' | '2';
|
||||
|
||||
type CategorySearchParams = {
|
||||
categoryName?: string | null,
|
||||
categoryType?: string | null
|
||||
}
|
||||
categoryName?: string | null;
|
||||
categoryType?: string | null;
|
||||
};
|
||||
|
||||
type Category = {
|
||||
id: number;
|
||||
|
@ -6,7 +6,7 @@ import { $t } from '@/locales';
|
||||
import { useAppStore } from '@/store/modules/app';
|
||||
const appStore = useAppStore();
|
||||
|
||||
const model = defineModel<Api.DictionaryType.DictionaryTypeSearchParams>('model', { required: true });
|
||||
const model = defineModel<Api.DictionaryData.DictionaryDataSearchParams>('model', { required: true });
|
||||
|
||||
const btnSpan = computed(() => (appStore.isMobile ? '7' : '7'));
|
||||
|
||||
@ -29,10 +29,24 @@ async function updateOptions() {
|
||||
}
|
||||
|
||||
function translateOptions(dictTypes: Api.DictionaryType.DictionaryType[]) {
|
||||
return dictTypes.map(dictType => ({
|
||||
value: dictType.dictType,
|
||||
label: dictType.dictName
|
||||
}));
|
||||
type dictOpt = {
|
||||
value: string;
|
||||
label: string;
|
||||
};
|
||||
const dictOpts: Array<dictOpt> = [
|
||||
{
|
||||
value: '',
|
||||
label: ''
|
||||
}
|
||||
];
|
||||
|
||||
dictOpts.push(
|
||||
...dictTypes.map(dictType => ({
|
||||
value: dictType.dictType,
|
||||
label: dictType.dictName
|
||||
}))
|
||||
);
|
||||
return dictOpts;
|
||||
}
|
||||
|
||||
function search() {
|
||||
@ -58,9 +72,9 @@ function reset() {
|
||||
:placeholder="$t('page.dictionaryType.form.dictionaryName')"
|
||||
/>
|
||||
</NFormItemGi>
|
||||
<!-- 字典类型 -->
|
||||
<!-- 字典标签 -->
|
||||
<NFormItemGi span="m:7" :label="$t('page.dictionaryData.form.dictLabel')" path="dictType" class="pr-0px">
|
||||
<NInput v-model:value="model.dictName" :placeholder="$t('page.dictionaryData.form.dictLabel')" clearable />
|
||||
<NInput v-model:value="model.dictLabel" :placeholder="$t('page.dictionaryData.form.dictLabel')" clearable />
|
||||
</NFormItemGi>
|
||||
|
||||
<!-- 按钮 -->
|
||||
|
271
vite.config.ts.timestamp-1741836248153-b8376754cf3e.mjs
Normal file
271
vite.config.ts.timestamp-1741836248153-b8376754cf3e.mjs
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user