合并字典bug修复
This commit is contained in:
commit
0d046eae37
@ -71,16 +71,6 @@ export const generatedRoutes: GeneratedRoute[] = [
|
|||||||
keepAlive: false
|
keepAlive: false
|
||||||
},
|
},
|
||||||
children: [
|
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',
|
name: 'dictionary_type',
|
||||||
path: '/dictionary/type',
|
path: '/dictionary/type',
|
||||||
@ -90,6 +80,16 @@ export const generatedRoutes: GeneratedRoute[] = [
|
|||||||
i18nKey: 'route.dictionary_type',
|
i18nKey: 'route.dictionary_type',
|
||||||
icon: 'octicon:tasklist'
|
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 CategoryType = '1' | '2';
|
||||||
|
|
||||||
type CategorySearchParams = {
|
type CategorySearchParams = {
|
||||||
categoryName?: string | null,
|
categoryName?: string | null;
|
||||||
categoryType?: string | null
|
categoryType?: string | null;
|
||||||
}
|
};
|
||||||
|
|
||||||
type Category = {
|
type Category = {
|
||||||
id: number;
|
id: number;
|
||||||
|
@ -6,7 +6,7 @@ import { $t } from '@/locales';
|
|||||||
import { useAppStore } from '@/store/modules/app';
|
import { useAppStore } from '@/store/modules/app';
|
||||||
const appStore = useAppStore();
|
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'));
|
const btnSpan = computed(() => (appStore.isMobile ? '7' : '7'));
|
||||||
|
|
||||||
@ -29,10 +29,24 @@ async function updateOptions() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function translateOptions(dictTypes: Api.DictionaryType.DictionaryType[]) {
|
function translateOptions(dictTypes: Api.DictionaryType.DictionaryType[]) {
|
||||||
return dictTypes.map(dictType => ({
|
type dictOpt = {
|
||||||
value: dictType.dictType,
|
value: string;
|
||||||
label: dictType.dictName
|
label: string;
|
||||||
}));
|
};
|
||||||
|
const dictOpts: Array<dictOpt> = [
|
||||||
|
{
|
||||||
|
value: '',
|
||||||
|
label: ''
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
dictOpts.push(
|
||||||
|
...dictTypes.map(dictType => ({
|
||||||
|
value: dictType.dictType,
|
||||||
|
label: dictType.dictName
|
||||||
|
}))
|
||||||
|
);
|
||||||
|
return dictOpts;
|
||||||
}
|
}
|
||||||
|
|
||||||
function search() {
|
function search() {
|
||||||
@ -58,9 +72,9 @@ function reset() {
|
|||||||
:placeholder="$t('page.dictionaryType.form.dictionaryName')"
|
:placeholder="$t('page.dictionaryType.form.dictionaryName')"
|
||||||
/>
|
/>
|
||||||
</NFormItemGi>
|
</NFormItemGi>
|
||||||
<!-- 字典类型 -->
|
<!-- 字典标签 -->
|
||||||
<NFormItemGi span="m:7" :label="$t('page.dictionaryData.form.dictLabel')" path="dictType" class="pr-0px">
|
<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>
|
</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