fix: Fix style confusion and update markdown file and icon
* fix: Fix style confusion * fix: Update markdown file and icon
@ -1,15 +1,16 @@
|
|||||||
## 概述
|
## 概述
|
||||||
|
|
||||||
博查工具是一个支持自然语言搜索的 Web Search API,从近百亿网页和生态内容源中搜索高质量世界知识,包括新闻、图片、视频、百科、机酒、学术等.
|
博查工具是一个支持自然语言搜索的 Web Search API,从近百亿网页和生态内容源中搜索高质量世界知识,包括新闻、图片、视频、百科、机酒、学术等。
|
||||||
|
|
||||||
|
|
||||||
## 配置
|
## 配置
|
||||||
|
|
||||||
1. 获取API Key
|
1. 获取API Key
|
||||||
在[博查开放平台](https://open.bochaai.com/overview) 上申请 API 密钥。
|
在[博查开放平台](https://open.bochaai.com/overview) 上申请 API 密钥。
|
||||||

|

|
||||||
2. 在函数库中配置
|
2. 在函数库中配置
|
||||||
在函数库的博查函数面板中,点击 … > 启用参数,填写 API 密钥,并启用博查函数。
|
在函数库的博查函数面板中,点击 … > 启用参数,填写 API 密钥,并启用该函数。
|
||||||

|

|
||||||
3. 在应用中使用
|
3. 在应用中使用
|
||||||
在高级编排应用中,点击添加组件->函数库->博查,设置使用参数。
|
在高级编排应用中,点击添加组件->函数库->博查,设置使用参数。
|
||||||

|

|
||||||
|
|||||||
@ -5,18 +5,17 @@ Google 搜索工具是一个实时 API,可提取搜索引擎结果,提供来
|
|||||||
## 配置
|
## 配置
|
||||||
|
|
||||||
1. 创建 Google Custom Search Engine
|
1. 创建 Google Custom Search Engine
|
||||||
在[Programmable Search Engine](https://programmablesearchengine.google.com/)中 添加 Search Engine
|
在[Programmable Search Engine](https://programmablesearchengine.google.com/)中 添加 Search Engine
|
||||||

|

|
||||||
2. 获取cx参数
|
2. 获取cx参数
|
||||||
进入添加引擎,在【基本】菜单中获取搜索引擎的ID,即cx。
|
进入添加的引擎详情中,在【基本】菜单中获取搜索引擎的ID,即cx。
|
||||||
 3.获取 API Key
|

|
||||||
打开 https://developers.google.com/custom-search/v1/overview?hl=zh-cn,获取API Key。
|
3.获取 API Key
|
||||||

|
打开 https://developers.google.com/custom-search/v1/overview?hl=zh-cn 获取API Key。
|
||||||
|

|
||||||
3. 配置启动参数
|
4. 配置启动参数
|
||||||
在Google搜索函数的启动参数中填写配置以上参数。
|
在Google 搜索函数的启动参数中填写配置以上参数,并启用该函数。
|
||||||

|

|
||||||
|
5. 在应用中使用
|
||||||
4. 在应用中使用
|
在高级编排应用中,点击添加组件->函数库->Google搜索,设置使用参数。
|
||||||
在高级编排应用中,点击添加组件->函数库->博查,设置使用参数。
|

|
||||||

|
|
||||||
|
|||||||
BIN
ui/public/fx/img/MySQL_app_used.jpg
Normal file
|
After Width: | Height: | Size: 587 KiB |
BIN
ui/public/fx/img/MySQL_setting.jpg
Normal file
|
After Width: | Height: | Size: 274 KiB |
BIN
ui/public/fx/img/PostgreSQL_app_used.jpg
Normal file
|
After Width: | Height: | Size: 567 KiB |
BIN
ui/public/fx/img/PostgreSQL_setting.jpg
Normal file
|
After Width: | Height: | Size: 284 KiB |
|
Before Width: | Height: | Size: 554 KiB After Width: | Height: | Size: 586 KiB |
|
Before Width: | Height: | Size: 240 KiB After Width: | Height: | Size: 227 KiB |
|
Before Width: | Height: | Size: 587 KiB After Width: | Height: | Size: 596 KiB |
|
Before Width: | Height: | Size: 260 KiB After Width: | Height: | Size: 235 KiB |
|
Before Width: | Height: | Size: 542 KiB After Width: | Height: | Size: 590 KiB |
|
Before Width: | Height: | Size: 240 KiB After Width: | Height: | Size: 256 KiB |
@ -1,15 +1,17 @@
|
|||||||
## 概述
|
## 概述
|
||||||
|
|
||||||
博查工具是一个支持自然语言搜索的 Web Search API,从近百亿网页和生态内容源中搜索高质量世界知识,包括新闻、图片、视频、百科、机酒、学术等.
|
LangSearch 是一个提供免费Web Search API和Rerank API的服务,支持新闻、图像、视频等内容。它结合了关键词和向量进行混合搜索,以提高准确性。
|
||||||
|
|
||||||
|
|
||||||
## 配置
|
## 配置
|
||||||
|
|
||||||
1. 获取API Key
|
1. 获取API Key
|
||||||
在[博查开放平台](https://open.bochaai.com/overview) 上申请 API 密钥。
|
在[Langsearch](https://langsearch.com/overview) 上申请 API 密钥。
|
||||||

|

|
||||||
2. 在函数库中配置
|
2. 在函数库中配置
|
||||||
在函数库的博查函数面板中,点击 … > 启用参数,填写 API 密钥,并启用博查函数。
|
在函数库的LangSearch函数面板中,点击 … > 启用参数,填写 API 密钥,并启用该函数。
|
||||||

|

|
||||||
3. 在应用中使用
|
3. 在应用中使用
|
||||||
在高级编排应用中,点击添加组件->函数库->博查,设置使用参数。
|
在高级编排应用中,点击添加组件->函数库->LangSearch,设置使用参数。
|
||||||

|

|
||||||
|
|
||||||
14
ui/public/fx/mysql/detail.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
## 概述
|
||||||
|
|
||||||
|
MySQL查询是一个连接MySQL数据库执行SQL查询的工具。
|
||||||
|
|
||||||
|
|
||||||
|
## 配置
|
||||||
|
|
||||||
|
1. 在函数库中配置启动参数
|
||||||
|
在函数库的MySQL函数面板中,点击 … > 启用参数,填写数据库连接参数,并启用该函数。
|
||||||
|

|
||||||
|
2. 在应用中使用
|
||||||
|
在高级编排应用中,点击添加组件->函数库->MySQL查询,设置查询内容。
|
||||||
|

|
||||||
|
|
||||||
14
ui/public/fx/postgresql/detail.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
## 概述
|
||||||
|
|
||||||
|
PostgreSQL查询是一个连接PostgreSQL数据库执行SQL查询的工具。
|
||||||
|
|
||||||
|
|
||||||
|
## 配置
|
||||||
|
|
||||||
|
1. 在函数库中配置启动参数
|
||||||
|
在函数库的PostgreSQL函数面板中,点击 … > 启用参数,填写数据库连接参数,并启用该函数。
|
||||||
|

|
||||||
|
2. 在应用中使用
|
||||||
|
在高级编排应用中,点击添加组件->函数库->PostgreSQL查询,设置查询内容。
|
||||||
|

|
||||||
|
|
||||||
1
ui/src/assets/fileType/file-icon.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1742986045279" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="16253" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M42.666667 170.666667a42.666667 42.666667 0 0 1 42.666666-42.666667h357.632a42.666667 42.666667 0 0 1 38.144 23.594667L512 213.333333h426.666667a42.666667 42.666667 0 0 1 42.666666 42.666667v597.333333a42.666667 42.666667 0 0 1-42.666666 42.666667H85.333333a42.666667 42.666667 0 0 1-42.666666-42.666667V170.666667z" fill="#FFA53D" p-id="16254"></path><path d="M42.666667 256a42.666667 42.666667 0 0 1 42.666666-42.666667h853.333334a42.666667 42.666667 0 0 1 42.666666 42.666667v597.333333a42.666667 42.666667 0 0 1-42.666666 42.666667H85.333333a42.666667 42.666667 0 0 1-42.666666-42.666667V256z" fill="#FFC60A" p-id="16255"></path></svg>
|
||||||
|
After Width: | Height: | Size: 973 B |
@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="item-content mb-16 lighter">
|
<div class="item-content mb-16 lighter">
|
||||||
|
|
||||||
<template v-for="(answer_text, index) in answer_text_list" :key="index">
|
<template v-for="(answer_text, index) in answer_text_list" :key="index">
|
||||||
<div class="avatar mr-8" v-if="application.show_avatar">
|
<div class="avatar mr-8" v-if="application.show_avatar">
|
||||||
<img v-if="application.avatar" :src="application.avatar" height="28px" width="28px" />
|
<img v-if="application.avatar" :src="application.avatar" height="28px" width="28px" />
|
||||||
|
|||||||
@ -8,6 +8,7 @@
|
|||||||
@touchstart="onTouchStart"
|
@touchstart="onTouchStart"
|
||||||
@touchmove="onTouchMove"
|
@touchmove="onTouchMove"
|
||||||
@touchend="onTouchEnd"
|
@touchend="onTouchEnd"
|
||||||
|
:disabled="props.disabled"
|
||||||
>
|
>
|
||||||
按住说话
|
按住说话
|
||||||
</el-button>
|
</el-button>
|
||||||
@ -47,6 +48,10 @@ const props = defineProps({
|
|||||||
start: {
|
start: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
disabled: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const emit = defineEmits(['TouchStart', 'TouchEnd'])
|
const emit = defineEmits(['TouchStart', 'TouchEnd'])
|
||||||
@ -57,11 +62,19 @@ const dialogVisible = ref(false)
|
|||||||
const message = ref('按住说话')
|
const message = ref('按住说话')
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.time,
|
() => [props.time, props.start],
|
||||||
(val) => {
|
([time, start]) => {
|
||||||
if (val && val === 60) {
|
if (start) {
|
||||||
|
isTouching.value = true
|
||||||
|
dialogVisible.value = true
|
||||||
|
message.value = '松开发送,上滑取消'
|
||||||
|
if (time === 60) {
|
||||||
|
dialogVisible.value = false
|
||||||
|
emit('TouchEnd', isTouching.value)
|
||||||
|
isTouching.value = false
|
||||||
|
}
|
||||||
|
} else {
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
emit('TouchEnd', isTouching.value)
|
|
||||||
isTouching.value = false
|
isTouching.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -120,6 +120,7 @@
|
|||||||
@TouchEnd="TouchEnd"
|
@TouchEnd="TouchEnd"
|
||||||
:time="recorderTime"
|
:time="recorderTime"
|
||||||
:start="!mediaRecorderStatus"
|
:start="!mediaRecorderStatus"
|
||||||
|
:disabled="loading"
|
||||||
/>
|
/>
|
||||||
<el-input
|
<el-input
|
||||||
v-else
|
v-else
|
||||||
@ -149,7 +150,12 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
<span class="flex align-center" v-else>
|
<span class="flex align-center" v-else>
|
||||||
<el-button text @click="startRecording" v-if="mediaRecorderStatus">
|
<el-button
|
||||||
|
:disabled="loading"
|
||||||
|
text
|
||||||
|
@click="startRecording"
|
||||||
|
v-if="mediaRecorderStatus"
|
||||||
|
>
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<Microphone />
|
<Microphone />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
@ -166,7 +172,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="!startRecorderTime && !recorderLoading">
|
<template v-if="(!startRecorderTime && !recorderLoading) || mode === 'mobile'">
|
||||||
<span v-if="props.applicationDetails.file_upload_enable" class="flex align-center ml-4">
|
<span v-if="props.applicationDetails.file_upload_enable" class="flex align-center ml-4">
|
||||||
<el-upload
|
<el-upload
|
||||||
action="#"
|
action="#"
|
||||||
@ -515,7 +521,12 @@ const stopRecording = () => {
|
|||||||
// 上传录音文件
|
// 上传录音文件
|
||||||
const uploadRecording = async (audioBlob: Blob) => {
|
const uploadRecording = async (audioBlob: Blob) => {
|
||||||
try {
|
try {
|
||||||
|
// 非自动发送切换输入框
|
||||||
|
if (!props.applicationDetails.stt_autosend) {
|
||||||
|
isMicrophone.value = false
|
||||||
|
}
|
||||||
recorderLoading.value = true
|
recorderLoading.value = true
|
||||||
|
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
formData.append('file', audioBlob, 'recording.mp3')
|
formData.append('file', audioBlob, 'recording.mp3')
|
||||||
applicationApi
|
applicationApi
|
||||||
|
|||||||
@ -17,26 +17,4 @@ defineProps<{
|
|||||||
tooltip: string
|
tooltip: string
|
||||||
}>()
|
}>()
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped></style>
|
||||||
.aiMode-param-dialog {
|
|
||||||
padding: 8px 8px 24px 8px;
|
|
||||||
|
|
||||||
.el-dialog__header {
|
|
||||||
padding: 16px 16px 0 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-dialog__body {
|
|
||||||
padding: 16px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dialog-max-height {
|
|
||||||
height: 550px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-slider {
|
|
||||||
.el-input-number.is-without-controls .el-input__wrapper {
|
|
||||||
padding: 0 !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
@ -34,7 +34,7 @@ export default {
|
|||||||
datasetName: {
|
datasetName: {
|
||||||
label: '知识库名称',
|
label: '知识库名称',
|
||||||
placeholder: '请输入知识库名称',
|
placeholder: '请输入知识库名称',
|
||||||
requiredMessage: '请输入应用名称'
|
requiredMessage: '请输入知识库名称'
|
||||||
},
|
},
|
||||||
datasetDescription: {
|
datasetDescription: {
|
||||||
label: '知识库描述',
|
label: '知识库描述',
|
||||||
|
|||||||
@ -33,7 +33,7 @@ export default {
|
|||||||
datasetName: {
|
datasetName: {
|
||||||
label: '知識庫名稱',
|
label: '知識庫名稱',
|
||||||
placeholder: '請輸入知識庫名稱',
|
placeholder: '請輸入知識庫名稱',
|
||||||
requiredMessage: '請輸入應用名稱'
|
requiredMessage: '請輸入知識庫名稱'
|
||||||
},
|
},
|
||||||
datasetDescription: {
|
datasetDescription: {
|
||||||
label: '知識庫描述',
|
label: '知識庫描述',
|
||||||
|
|||||||
@ -772,3 +772,22 @@ h5 {
|
|||||||
background: #d6e2ff;
|
background: #d6e2ff;
|
||||||
line-height: 25px;
|
line-height: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 参数设置dialog
|
||||||
|
.param-dialog {
|
||||||
|
padding: 8px 8px 24px 8px;
|
||||||
|
.el-dialog__header {
|
||||||
|
padding: 16px 16px 0 16px;
|
||||||
|
}
|
||||||
|
.el-dialog__body {
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
.dialog-max-height {
|
||||||
|
height: 550px;
|
||||||
|
}
|
||||||
|
.custom-slider {
|
||||||
|
.el-input-number.is-without-controls .el-input__wrapper {
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -425,5 +425,5 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.el-tree {
|
.el-tree {
|
||||||
--el-tree-node-content-height: 32px;
|
--el-tree-node-content-height: 38px;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<el-dialog
|
<el-dialog
|
||||||
align-center
|
align-center
|
||||||
:title="$t('common.paramSetting')"
|
:title="$t('common.paramSetting')"
|
||||||
class="aiMode-param-dialog"
|
class="param-dialog"
|
||||||
v-model="dialogVisible"
|
v-model="dialogVisible"
|
||||||
style="width: 550px"
|
style="width: 550px"
|
||||||
append-to-body
|
append-to-body
|
||||||
@ -89,26 +89,4 @@ const submit = async () => {
|
|||||||
defineExpose({ open, reset_default })
|
defineExpose({ open, reset_default })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped></style>
|
||||||
.aiMode-param-dialog {
|
|
||||||
padding: 8px 8px 24px 8px;
|
|
||||||
|
|
||||||
.el-dialog__header {
|
|
||||||
padding: 16px 16px 0 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-dialog__body {
|
|
||||||
padding: 16px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dialog-max-height {
|
|
||||||
height: 550px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-slider {
|
|
||||||
.el-input-number.is-without-controls .el-input__wrapper {
|
|
||||||
padding: 0 !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
@ -144,7 +144,7 @@ const refresh = () => {
|
|||||||
|
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss">
|
||||||
.addDataset-dialog {
|
.addDataset-dialog {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
.el-dialog__header {
|
.el-dialog__header {
|
||||||
|
|||||||
@ -9,13 +9,21 @@
|
|||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:close-on-press-escape="false"
|
:close-on-press-escape="false"
|
||||||
>
|
>
|
||||||
<el-form label-position="top" ref="paramFormRef" :model="form"
|
<el-form
|
||||||
require-asterisk-position="right">
|
label-position="top"
|
||||||
|
ref="paramFormRef"
|
||||||
|
:model="form"
|
||||||
|
require-asterisk-position="right"
|
||||||
|
>
|
||||||
<el-form-item label="MCP" prop="mcp_enable">
|
<el-form-item label="MCP" prop="mcp_enable">
|
||||||
<el-switch v-model="form.mcp_enable" />
|
<el-switch v-model="form.mcp_enable" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="form.mcp_enable" label="MCP Server Config" prop="mcp_servers"
|
<el-form-item
|
||||||
:rules="[{ required: true, message: $t('common.required') }]">
|
v-if="form.mcp_enable"
|
||||||
|
label="MCP Server Config"
|
||||||
|
prop="mcp_servers"
|
||||||
|
:rules="[{ required: true, message: $t('common.required') }]"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.mcp_servers"
|
v-model="form.mcp_servers"
|
||||||
:rows="6"
|
:rows="6"
|
||||||
@ -49,7 +57,6 @@ const mcpServerJson = `{
|
|||||||
}
|
}
|
||||||
}`
|
}`
|
||||||
|
|
||||||
|
|
||||||
const form = ref<any>({
|
const form = ref<any>({
|
||||||
mcp_servers: '',
|
mcp_servers: '',
|
||||||
mcp_enable: false
|
mcp_enable: false
|
||||||
@ -82,26 +89,4 @@ const submit = () => {
|
|||||||
|
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped></style>
|
||||||
.param-dialog {
|
|
||||||
padding: 8px 8px 24px 8px;
|
|
||||||
|
|
||||||
.el-dialog__header {
|
|
||||||
padding: 16px 16px 0 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-dialog__body {
|
|
||||||
padding: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dialog-max-height {
|
|
||||||
height: 560px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-slider {
|
|
||||||
.el-input-number.is-without-controls .el-input__wrapper {
|
|
||||||
padding: 0 !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
@ -326,22 +326,6 @@ function changeHandle(val: string) {
|
|||||||
|
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss">
|
||||||
.param-dialog {
|
|
||||||
padding: 8px 8px 24px 8px;
|
|
||||||
.el-dialog__header {
|
|
||||||
padding: 16px 16px 0 16px;
|
|
||||||
}
|
|
||||||
.el-dialog__body {
|
|
||||||
padding: 0 !important;
|
|
||||||
}
|
|
||||||
.dialog-max-height {
|
|
||||||
height: 560px;
|
|
||||||
}
|
|
||||||
.custom-slider {
|
|
||||||
.el-input-number.is-without-controls .el-input__wrapper {
|
|
||||||
padding: 0 !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -84,26 +84,4 @@ const submit = () => {
|
|||||||
|
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped></style>
|
||||||
.param-dialog {
|
|
||||||
padding: 8px 8px 24px 8px;
|
|
||||||
|
|
||||||
.el-dialog__header {
|
|
||||||
padding: 16px 16px 0 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-dialog__body {
|
|
||||||
padding: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dialog-max-height {
|
|
||||||
height: 560px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-slider {
|
|
||||||
.el-input-number.is-without-controls .el-input__wrapper {
|
|
||||||
padding: 0 !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
@ -2,9 +2,9 @@
|
|||||||
<el-dialog
|
<el-dialog
|
||||||
align-center
|
align-center
|
||||||
:title="$t('common.paramSetting')"
|
:title="$t('common.paramSetting')"
|
||||||
class="aiMode-param-dialog"
|
|
||||||
v-model="dialogVisible"
|
v-model="dialogVisible"
|
||||||
style="width: 550px"
|
style="width: 550px"
|
||||||
|
class="param-dialog"
|
||||||
append-to-body
|
append-to-body
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:close-on-press-escape="false"
|
:close-on-press-escape="false"
|
||||||
@ -25,7 +25,6 @@
|
|||||||
<el-button @click="testPlay" :loading="playLoading">
|
<el-button @click="testPlay" :loading="playLoading">
|
||||||
<AppIcon iconName="app-video-play" class="mr-4"></AppIcon>
|
<AppIcon iconName="app-video-play" class="mr-4"></AppIcon>
|
||||||
{{ $t('views.application.applicationForm.form.voicePlay.listeningTest') }}
|
{{ $t('views.application.applicationForm.form.voicePlay.listeningTest') }}
|
||||||
|
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
<span class="dialog-footer p-16">
|
<span class="dialog-footer p-16">
|
||||||
@ -77,15 +76,17 @@ const open = (model_id: string, application_id?: string, model_setting_data?: an
|
|||||||
api.then((ok) => {
|
api.then((ok) => {
|
||||||
model_form_field.value = ok.data
|
model_form_field.value = ok.data
|
||||||
const resp = ok.data
|
const resp = ok.data
|
||||||
.map((item: any) => ({ [item.field]: item.show_default_value !== false ? item.default_value : undefined }))
|
.map((item: any) => ({
|
||||||
|
[item.field]: item.show_default_value !== false ? item.default_value : undefined
|
||||||
|
}))
|
||||||
.reduce((x, y) => ({ ...x, ...y }), {})
|
.reduce((x, y) => ({ ...x, ...y }), {})
|
||||||
// 删除不存在的字段
|
// 删除不存在的字段
|
||||||
if (model_setting_data) {
|
if (model_setting_data) {
|
||||||
Object.keys(model_setting_data).forEach(key => {
|
Object.keys(model_setting_data).forEach((key) => {
|
||||||
if (!(key in resp)) {
|
if (!(key in resp)) {
|
||||||
delete model_setting_data[key];
|
delete model_setting_data[key]
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
model_setting_data = { ...resp, ...model_setting_data }
|
model_setting_data = { ...resp, ...model_setting_data }
|
||||||
// 渲染动态表单
|
// 渲染动态表单
|
||||||
@ -99,7 +100,9 @@ const reset_default = (model_id: string, application_id?: string) => {
|
|||||||
api.then((ok) => {
|
api.then((ok) => {
|
||||||
model_form_field.value = ok.data
|
model_form_field.value = ok.data
|
||||||
const model_setting_data = ok.data
|
const model_setting_data = ok.data
|
||||||
.map((item) => ({ [item.field]: item.show_default_value !== false ? item.default_value : undefined }))
|
.map((item) => ({
|
||||||
|
[item.field]: item.show_default_value !== false ? item.default_value : undefined
|
||||||
|
}))
|
||||||
.reduce((x, y) => ({ ...x, ...y }), {})
|
.reduce((x, y) => ({ ...x, ...y }), {})
|
||||||
|
|
||||||
emit('refresh', model_setting_data)
|
emit('refresh', model_setting_data)
|
||||||
@ -149,26 +152,4 @@ const testPlay = () => {
|
|||||||
defineExpose({ open, reset_default })
|
defineExpose({ open, reset_default })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped></style>
|
||||||
.aiMode-param-dialog {
|
|
||||||
padding: 8px 8px 24px 8px;
|
|
||||||
|
|
||||||
.el-dialog__header {
|
|
||||||
padding: 16px 16px 0 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-dialog__body {
|
|
||||||
padding: 16px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dialog-max-height {
|
|
||||||
height: 550px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-slider {
|
|
||||||
.el-input-number.is-without-controls .el-input__wrapper {
|
|
||||||
padding: 0 !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
@ -53,30 +53,25 @@
|
|||||||
>
|
>
|
||||||
<template #default="{ node, data }">
|
<template #default="{ node, data }">
|
||||||
<div class="custom-tree-node flex align-center lighter">
|
<div class="custom-tree-node flex align-center lighter">
|
||||||
<el-icon v-if="data.type === 'folder'">
|
<img
|
||||||
<FolderOpened />
|
src="@/assets/fileType/file-icon.svg"
|
||||||
</el-icon>
|
alt=""
|
||||||
<el-icon v-else-if="data.type === 'docx'">
|
height="20"
|
||||||
<Document />
|
v-if="data.type === 'folder'"
|
||||||
</el-icon>
|
/>
|
||||||
<el-icon class="xlsx-icon" v-else-if="data.type === 'sheet'">
|
<img
|
||||||
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
src="@/assets/fileType/docx-icon.svg"
|
||||||
<!-- 文件轮廓 -->
|
alt=""
|
||||||
<path
|
height="22"
|
||||||
d="M5 3H14L19 8V19C19 20.1 18.1 21 17 21H5C3.9 21 3 20.1 3 19V5C3 3.9 3.9 3 5 3Z"
|
v-else-if="data.type === 'docx'"
|
||||||
fill="white"
|
/>
|
||||||
stroke="currentColor"
|
<img
|
||||||
stroke-width="1.2"
|
src="@/assets/fileType/xlsx-icon.svg"
|
||||||
/>
|
alt=""
|
||||||
<!-- 放大后的 X 符号(占比提升30%) -->
|
height="22"
|
||||||
<path
|
v-else-if="data.type === 'sheet'"
|
||||||
d="M7 9L17 19M17 9L7 19"
|
/>
|
||||||
stroke="currentColor"
|
|
||||||
stroke-width="2.5"
|
|
||||||
stroke-linecap="round"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</el-icon>
|
|
||||||
<span class="ml-4">{{ node.label }}</span>
|
<span class="ml-4">{{ node.label }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -99,6 +94,7 @@
|
|||||||
import { ref, reactive, computed, onUnmounted } from 'vue'
|
import { ref, reactive, computed, onUnmounted } from 'vue'
|
||||||
import { useRouter, useRoute } from 'vue-router'
|
import { useRouter, useRoute } from 'vue-router'
|
||||||
import { MsgConfirm, MsgSuccess } from '@/utils/message'
|
import { MsgConfirm, MsgSuccess } from '@/utils/message'
|
||||||
|
import { getImgUrl } from '@/utils/utils'
|
||||||
import { t } from '@/locales'
|
import { t } from '@/locales'
|
||||||
import type Node from 'element-plus/es/components/tree/src/model/node'
|
import type Node from 'element-plus/es/components/tree/src/model/node'
|
||||||
import dataset from '@/api/dataset'
|
import dataset from '@/api/dataset'
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
require-asterisk-position="right"
|
require-asterisk-position="right"
|
||||||
>
|
>
|
||||||
<el-form-item prop="name">
|
<el-form-item prop="name">
|
||||||
<el-input v-model="form.name"></el-input>
|
<el-input v-model="form.name" maxlength="64" show-word-limit></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
|
|||||||
@ -43,9 +43,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item
|
<el-form-item :label="$t('views.application.applicationForm.dialog.topReferences')">
|
||||||
:label="$t('views.application.applicationForm.dialog.topReferences')"
|
|
||||||
>
|
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="form.top_n"
|
v-model="form.top_n"
|
||||||
:min="1"
|
:min="1"
|
||||||
@ -125,22 +123,4 @@ const submit = () => {
|
|||||||
|
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss"></style>
|
||||||
.param-dialog {
|
|
||||||
padding: 8px 8px 24px 8px;
|
|
||||||
.el-dialog__header {
|
|
||||||
padding: 16px 16px 0 16px;
|
|
||||||
}
|
|
||||||
.el-dialog__body {
|
|
||||||
padding: 0 !important;
|
|
||||||
}
|
|
||||||
.dialog-max-height {
|
|
||||||
height: 550px;
|
|
||||||
}
|
|
||||||
.custom-slider {
|
|
||||||
.el-input-number.is-without-controls .el-input__wrapper {
|
|
||||||
padding: 0 !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||