File tree Expand file tree Collapse file tree 4 files changed +10
-6
lines changed Expand file tree Collapse file tree 4 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,13 @@ const DictAPI = {
2121 } ) ;
2222 } ,
2323
24+ getList ( ) {
25+ return request < any , OptionType [ ] > ( {
26+ url : `${ DICT_BASE_URL } ` ,
27+ method : "get" ,
28+ } ) ;
29+ } ,
30+
2431 /**
2532 * 字典表单数据
2633 *
Original file line number Diff line number Diff line change @@ -656,10 +656,7 @@ async function handleOpenDialog(tableName: string) {
656656 currentTableName .value = tableName ;
657657 // 获取字典数据
658658 DictAPI .getList ().then ((data ) => {
659- dictOptions .value = data .map ((item ) => ({
660- label: item .name ,
661- value: item .dictCode ,
662- }));
659+ dictOptions .value = data ;
663660 loading .value = true ;
664661 GeneratorAPI .getGenConfig (tableName )
665662 .then ((data ) => {
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ function handleConfirm(data: IUser[]) {
2222}
2323const text = computed (() => {
2424 // 获取字典数据
25- const dictData = dictStore .getDictionary (" gender" );
25+ const dictData = dictStore .getDictItems (" gender" );
2626 const genderLabel = dictData .find ((item : any ) => item .value == selectedUser .value ?.gender )?.label ;
2727 return selectedUser .value
2828 ? ` ${selectedUser .value .username } - ${genderLabel } - ${selectedUser .value .deptName } `
Original file line number Diff line number Diff line change @@ -465,7 +465,7 @@ function handleSubmit() {
465465 handleQuery ();
466466 });
467467 } else {
468- MenuAPI .add (formData .value ).then (() => {
468+ MenuAPI .create (formData .value ).then (() => {
469469 ElMessage .success (" 新增成功" );
470470 handleCloseDialog ();
471471 handleQuery ();
You can’t perform that action at this time.
0 commit comments