fix: build

This commit is contained in:
wangdan-fit2cloud 2025-07-01 20:30:43 +08:00
parent 10eac10404
commit 1f8cffb189
11 changed files with 21 additions and 22 deletions

1
ui/env.d.ts vendored
View File

@ -1,4 +1,5 @@
/// <reference types="vite/client" /> /// <reference types="vite/client" />
declare module 'katex'
interface Window { interface Window {
sendMessage: ?((message: string, other_params_data: any) => void) sendMessage: ?((message: string, other_params_data: any) => void)
MaxKB: { MaxKB: {

View File

@ -31,8 +31,8 @@
"echarts": "^5.6.0", "echarts": "^5.6.0",
"element-plus": "^2.9.10", "element-plus": "^2.9.10",
"file-saver": "^2.0.5", "file-saver": "^2.0.5",
"katex": "^0.16.10",
"highlight.js": "^11.11.1", "highlight.js": "^11.11.1",
"katex": "^0.16.22",
"md-editor-v3": "^5.6.1", "md-editor-v3": "^5.6.1",
"mermaid": "^11.6.0", "mermaid": "^11.6.0",
"moment": "^2.30.1", "moment": "^2.30.1",
@ -54,6 +54,7 @@
}, },
"devDependencies": { "devDependencies": {
"@tsconfig/node22": "^22.0.1", "@tsconfig/node22": "^22.0.1",
"@types/file-saver": "^2.0.7",
"@types/node": "^22.14.0", "@types/node": "^22.14.0",
"@types/nprogress": "^0.2.3", "@types/nprogress": "^0.2.3",
"@vitejs/plugin-vue": "^5.2.3", "@vitejs/plugin-vue": "^5.2.3",

View File

@ -262,7 +262,7 @@ const playDemoText: (application_id: string, data: any, loading?: Ref<boolean>)
/** /**
* *
*/ */
const textToSpeech: ( const postTextToSpeech: (
application_id: String, application_id: String,
data: any, data: any,
loading?: Ref<boolean>, loading?: Ref<boolean>,
@ -318,7 +318,7 @@ export default {
publish, publish,
updatePlatformConfig, updatePlatformConfig,
playDemoText, playDemoText,
textToSpeech, postTextToSpeech,
speechToText, speechToText,
getMcpTools, getMcpTools,
} }

View File

@ -704,7 +704,7 @@ const getSpeechToTextAPI = () => {
return chatAPI.speechToText(data, loading) return chatAPI.speechToText(data, loading)
} }
} else { } else {
return applicationApi.textToSpeech return applicationApi.postTextToSpeech
} }
} }
const speechToTextAPI = getSpeechToTextAPI() const speechToTextAPI = getSpeechToTextAPI()

View File

@ -268,7 +268,7 @@ const getTextToSpeechAPI = () => {
return chatAPI.textToSpeech(data, loading) return chatAPI.textToSpeech(data, loading)
} }
} else { } else {
return applicationApi.textToSpeech return applicationApi.postTextToSpeech
} }
} }
const textToSpeechAPI = getTextToSpeechAPI() const textToSpeechAPI = getTextToSpeechAPI()

View File

@ -28,7 +28,7 @@ const {
} = route as any } = route as any
const isShared = computed(() => { const isShared = computed(() => {
return folderId === 'shared' || route.name?.includes('ResourceManagement') return folderId === 'shared'
}) })
const { theme } = useStore() const { theme } = useStore()
const isDefaultTheme = computed(() => { const isDefaultTheme = computed(() => {

View File

@ -122,11 +122,12 @@ function submit() {
} else if (radioType.value === 'custom' && iconFile.value) { } else if (radioType.value === 'custom' && iconFile.value) {
const fd = new FormData() const fd = new FormData()
fd.append('file', iconFile.value.raw) fd.append('file', iconFile.value.raw)
overviewApi.putAppIcon(id as string, fd, loading).then((res: any) => { // todo
emit('refresh') // overviewApi.putAppIcon(id as string, fd, loading).then((res: any) => {
MsgSuccess(t('common.saveSuccess')) // emit('refresh')
dialogVisible.value = false // MsgSuccess(t('common.saveSuccess'))
}) // dialogVisible.value = false
// })
} else { } else {
MsgError(t('common.EditAvatarDialog.uploadImagePrompt')) MsgError(t('common.EditAvatarDialog.uploadImagePrompt'))
} }

View File

@ -176,7 +176,7 @@ watch(dialogVisible, (bool) => {
} }
}) })
watch( watch(
() => form.authentication, () => form.value.authentication,
(b) => { (b) => {
if (b) { if (b) {
applicationApi.getChatUserAuthType().then((ok) => { applicationApi.getChatUserAuthType().then((ok) => {

View File

@ -10,19 +10,15 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, computed } from 'vue' import { ref, computed } from 'vue'
import useStore from '@/stores' import useStore from '@/stores'
import { t } from '@/locales' import { t } from '@/locales'
import { useRoute, useRouter } from 'vue-router' import { useRoute, useRouter } from 'vue-router'
const route = useRoute()
const FormRef = ref() const FormRef = ref()
const { chatUser } = useStore() const { chatUser } = useStore()
const props = defineProps<{ applicationProfile: any; modelValue: boolean }>()
const loading = ref<boolean>(false) const loading = ref<boolean>(false)
const router = useRouter() const router = useRouter()
const emit = defineEmits(['update:modelValue'])
const auth = () => { const auth = () => {
return chatUser.passwordAuthentication(form.value.password).then((ok) => { return chatUser.passwordAuthentication(form.value.password).then((ok) => {
router.push({ name: 'chat', params: { accessToken: chatUser.accessToken } }) router.push({ name: 'chat', params: { accessToken: chatUser.accessToken } })

View File

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<el-form ref="FormRef" :model="form" @submit.prevent="validator"> <el-form ref="FormRef" :model="form" @submit.prevent="validator">
<el-form-item prop="value" :rules="rules.value"> <el-form-item prop="value" :rules="rules">
<el-input show-password v-model="form.value" /> <el-input show-password v-model="form.value" />
</el-form-item> </el-form-item>
<el-button class="w-full mt-8" type="primary" @click="validator" :loading="loading"> <el-button class="w-full mt-8" type="primary" @click="validator" :loading="loading">
@ -11,7 +11,7 @@
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, computed } from 'vue' import { ref, reactive } from 'vue'
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
import useStore from '@/stores' import useStore from '@/stores'
import { t } from '@/locales' import { t } from '@/locales'
@ -38,9 +38,9 @@ const validator = () => {
FormRef.value.validate() FormRef.value.validate()
} }
const rules = { const rules = reactive({
value: [{ required: true, validator: validator_auth, trigger: 'manual' }], value: [{ required: true, validator: validator_auth, trigger: 'manual' }],
} })
const form = ref({ const form = ref({
type: 'password', type: 'password',

View File

@ -36,8 +36,8 @@ export default defineConfig((conf: any) => {
const ENV = loadEnv(mode, envDir) const ENV = loadEnv(mode, envDir)
const proxyConf: Record<string, string | ProxyOptions> = {} const proxyConf: Record<string, string | ProxyOptions> = {}
proxyConf['/admin/api'] = { proxyConf['/admin/api'] = {
// target: 'http://47.92.195.88:8080/', target: 'http://47.92.195.88:8080/',
target: 'http://127.0.0.1:8080', // target: 'http://127.0.0.1:8080',
changeOrigin: true, changeOrigin: true,
} }
proxyConf['/oss'] = { proxyConf['/oss'] = {