diff --git a/frontend/src/views/system/model/index.vue b/frontend/src/views/system/model/index.vue index 276aaec8..f5bc24c8 100644 --- a/frontend/src/views/system/model/index.vue +++ b/frontend/src/views/system/model/index.vue @@ -222,9 +222,17 @@ const openDialog = () => { } const resetForm = () => { if (!termFormRef) return - Object.keys(state.form).forEach((key) => { - state.form[key as keyof typeof state.form] = null - }) + state.form = { + id: '', + name: '', + type: 0, + api_key: '', + endpoint: '', + max_context_window: 0, + temperature: 0, + status: false, + description: '' + } } const closeForm = () => { diff --git a/frontend/src/views/system/user/index.vue b/frontend/src/views/system/user/index.vue index 60165523..050ba615 100644 --- a/frontend/src/views/system/user/index.vue +++ b/frontend/src/views/system/user/index.vue @@ -147,6 +147,7 @@ const handleSearch = (e: any) => { console.log('search', e); } const editHandler = (id: any) => { + console.log('editHandler', id) /* userApi.query(id).then((res: any) => { console.log('term detail', res) state.form = res @@ -154,6 +155,7 @@ const editHandler = (id: any) => { }) */ } const deleteHandler = (id: any) => { + console.log('deleteHandler', id) ElMessageBox.confirm( 'Are you sure to delete?', 'Warning', @@ -181,9 +183,9 @@ const deleteHandler = (id: any) => { }) } -const openDialog = () => { +/* const openDialog = () => { dialogFormVisible.value = true -} +} */ const resetForm = () => { if (!termFormRef) return Object.keys(state.form).forEach((key) => {