Skip to content

Commit

Permalink
fix: AI导出需要必须选择表
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelmaxQm committed Oct 18, 2024
1 parent 1753bf9 commit b0eedfd
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions web/src/view/systemTools/exportTemplate/exportTemplate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -250,14 +250,14 @@
</el-form-item>

<el-form-item
label="AI用关联表"
label="需用到的表"
prop="tables"
>
<el-select
multiple
v-model="tables"
clearable
placeholder="关联表使用AI关联的情况下请选择"
placeholder="使用AI的情况下请选择"
>
<el-option
v-for="item in tableOptions"
Expand Down Expand Up @@ -651,6 +651,13 @@ const getTablesCloumn = async() => {
const autoExport = async () => {
if (tables.value.length === 0) {
ElMessage({
type: 'error',
message: '请先选择需要参与导出的表'
})
return
}
aiLoading.value = true
const tableMap = await getTablesCloumn()
const aiRes = await butler({prompt:prompt.value,businessDB: formData.value.dbName||"",tableMap:tableMap,command:'autoExportTemplate'})
Expand Down

0 comments on commit b0eedfd

Please sign in to comment.