|
|
|
@ -46,7 +46,7 @@
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import userIcon from '@/assets/images/ai/user-icon.png'
|
|
|
|
|
import { lineAndBar } from '../ChartDataAjax/handlerFormat.js'
|
|
|
|
|
import { ref, toRefs, computed, onBeforeUnmount, nextTick, watch, toRaw, reactive, onMounted } from 'vue'
|
|
|
|
|
import { ref, toRefs, computed, onBeforeUnmount, nextTick, watch, toRaw, reactive, watchEffect } from 'vue'
|
|
|
|
|
import { icon } from '@/plugins'
|
|
|
|
|
import { useDesignStore } from '@/store/modules/designStore/designStore'
|
|
|
|
|
import { SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting'
|
|
|
|
@ -105,11 +105,12 @@ const sendHandle = async () => {
|
|
|
|
|
loading: true
|
|
|
|
|
})
|
|
|
|
|
lastIndex.value = messageList.value.length - 1
|
|
|
|
|
if (!targetData.value.request.requestUrl) targetData.value.request.requestUrl = 'https://baijiahu.mynatapp.cc/api'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
targetData.value.request = {
|
|
|
|
|
requestDataType: RequestDataTypeEnum.AJAX,
|
|
|
|
|
requestHttpType: RequestHttpEnum.POST,
|
|
|
|
|
requestUrl: '',
|
|
|
|
|
requestUrl: 'https://baijiahu.mynatapp.cc/api',
|
|
|
|
|
requestInterval: 300, //十分钟600
|
|
|
|
|
requestIntervalUnit: RequestHttpIntervalEnum.SECOND,
|
|
|
|
|
requestContentType: RequestContentTypeEnum.DEFAULT,
|
|
|
|
@ -119,7 +120,7 @@ const sendHandle = async () => {
|
|
|
|
|
},
|
|
|
|
|
requestParams: {
|
|
|
|
|
Body: {
|
|
|
|
|
'form-data': {},
|
|
|
|
|
'form-data': {prompt:keyWord.value},
|
|
|
|
|
'x-www-form-urlencoded': {},
|
|
|
|
|
json: '',
|
|
|
|
|
xml: ''
|
|
|
|
@ -128,6 +129,7 @@ const sendHandle = async () => {
|
|
|
|
|
Params: {}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
const res = await customizeHttp(toRaw(targetData.value.request), toRaw(chartEditStore.getRequestGlobalConfig))
|
|
|
|
|
loading.value = false
|
|
|
|
@ -175,6 +177,15 @@ watch(
|
|
|
|
|
{ deep: true }
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// watchEffect(() => {
|
|
|
|
|
// const filter = targetData.value?.filter
|
|
|
|
|
// if (lastFilter !== filter && firstFocus) {
|
|
|
|
|
// lastFilter = filter
|
|
|
|
|
// sendHandle()
|
|
|
|
|
// }
|
|
|
|
|
// firstFocus++
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
onBeforeUnmount(() => {
|
|
|
|
|
lastFilter = null
|
|
|
|
|
})
|
|
|
|
|