| | |
| | | <template> |
| | | <LoadingLayout :loading="state.loading"> |
| | | <AppContainer> |
| | | <ProTableQueryFilterBar @on-reset="reset"> |
| | | <ProTableQueryFilterBar @on-reset="handleReset"> |
| | | <template #query> |
| | | <QueryFilterItem> |
| | | <FieldSelect |
| | |
| | | isDisabled: false, |
| | | field1: '', |
| | | field2: [] as UploadUserFile[], |
| | | title: '新增字典', |
| | | }, |
| | | editTitle: '编辑字典', |
| | | }); |
| | | |
| | | async function handleAddOrEdit() { |
| | |
| | | let res = await dictionaryServices.saveDictionaryData(params); |
| | | if (res) { |
| | | Message.successMessage('操作成功'); |
| | | updateDictionaryDataSelect(); |
| | | updateDictionaryDataSelect(editForm.categoryId); |
| | | getList(paginationState.pageIndex); |
| | | dialogState.dialogVisible = false; |
| | | } |
| | |
| | | isDisabled: !row.isDisabled, |
| | | }; |
| | | let res = await dictionaryServices.setDictionaryDataIsDisabled(params); |
| | | updateDictionaryDataSelect(row.categoryId); |
| | | getList(paginationState.pageIndex); |
| | | return !!res; |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function handleReset() { |
| | | try { |
| | | const dictionaryCategoryList = await ensureQueryData(); |
| | | reset({ categoryId: dictionaryCategoryList[0].value }); |
| | | } catch (error) {} |
| | | } |
| | | </script> |