作者 lixiang

模型参数修改

... ... @@ -2,10 +2,10 @@
VITE_PORT = 3100
# 网站标题
VITE_GLOB_APP_TITLE = JeecgBoot 企业级低代码平台
VITE_GLOB_APP_TITLE = RAG智能问答系统
# 简称,此变量只能是字符/下划线
VITE_GLOB_APP_SHORT_NAME = JeecgBoot_Pro
VITE_GLOB_APP_SHORT_NAME = RAG智能问答系统
# 单点登录服务端地址
VITE_GLOB_APP_CAS_BASE_URL=http://cas.test.com:8443/cas
... ...
... ... @@ -16,7 +16,7 @@ VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false
VITE_GLOB_API_URL=/jeecgboot
#后台接口全路径地址(必填)
VITE_GLOB_DOMAIN_URL=http://jeecg-boot-system:8080/jeecg-boot
VITE_GLOB_DOMAIN_URL=http://192.168.100.5:8080
# 接口父路径前缀
VITE_GLOB_API_URL_PREFIX=
... ...
... ... @@ -61,7 +61,7 @@ export default {
},
login: {
backSignIn: '返回',
signInFormTitle: '登录',
signInFormTitle: 'RAG智能问答系统登录',
mobileSignInFormTitle: '手机登录',
qrSignInFormTitle: '二维码登录',
signUpFormTitle: '注册',
... ...
... ... @@ -28,6 +28,7 @@
@cancel="handleImportCancel"
width="600px"
:okButtonProps="{ disabled: !selectedKnowledgeId || !currentFile }"
:confirmLoading="loading"
>
<BasicForm @register="registerImportForm" :showActionButtonGroup="false" />
<div style="margin-top: 20px; margin-left: 5%">
... ... @@ -61,6 +62,7 @@
const queryParam = reactive<any>({});
const [registerModal, { openModal }] = useModal();
const importModalVisible = ref(false);
const loading = ref(false);
const selectedKnowledgeId = ref('');
const fileInput = ref<HTMLInputElement | null>(null);
const currentFile = ref<File | null>(null);
... ... @@ -189,7 +191,7 @@
message.warning('请完整填写上传信息');
return;
}
loading.value = true;
const formData = new FormData();
formData.append('file', currentFile.value, currentFile.value.name);
formData.append('knowledgeId', selectedKnowledgeId.value);
... ... @@ -223,6 +225,7 @@
if (result.success) {
message.success('上传成功');
importModalVisible.value = false;
handleSuccess();
} else {
throw new Error(result.message || '上传处理失败');
... ... @@ -231,6 +234,8 @@
uploadStatus.value = 'exception';
message.error(error.message || '上传失败');
console.error('上传错误:', error);
} finally {
loading.value = false;
}
}
... ...
... ... @@ -224,7 +224,7 @@ const sendButtonMessage = async (buttonValue: string) => {
};
messages.push(newMessage);
} else {
// createMessage.error('获取回答失败: 返回数据为空');
console.error('获取回答失败: 返回数据为空');
}
} catch (error: any) {
console.error('发送按钮消息失败:', error);
... ...
<!--<template>-->
<!-- <div style="min-height: 400px">-->
<!-- <BasicForm @register="registerForm"></BasicForm>-->
<!-- <div style="width: 100%;text-align: center" v-if="!formDisabled">-->
<!-- <a-button @click="submitForm" pre-icon="ant-design:check" type="primary">提 交</a-button>-->
<!-- </div>-->
<!-- </div>-->
<!--</template>-->
<!--<script lang="ts">-->
<!-- import {BasicForm, useForm} from '/@/components/Form/index';-->
<!-- import {computed, defineComponent} from 'vue';-->
<!-- import {defHttp} from '/@/utils/http/axios';-->
<!-- import { propTypes } from '/@/utils/propTypes';-->
<!-- import {getBpmFormSchema} from '../ZdyRag.data';-->
<!-- import {saveOrUpdate} from '../ZdyRag.api';-->
<!-- -->
<!-- export default defineComponent({-->
<!-- name: "TestForm",-->
<!-- components:{-->
<!-- BasicForm-->
<!-- },-->
<!-- props:{-->
<!-- formData: propTypes.object.def({}),-->
<!-- formBpm: propTypes.bool.def(true),-->
<!-- },-->
<!-- setup(props){-->
<!-- const [registerForm, { setFieldsValue, setProps, getFieldsValue }] = useForm({-->
<!-- labelWidth: 150,-->
<!-- schemas: getBpmFormSchema(props.formData),-->
<!-- showActionButtonGroup: false,-->
<!-- baseColProps: {span: 24}-->
<!-- });-->
<!-- const formDisabled = computed(()=>{-->
<!-- if(props.formData.disabled === false){-->
<!-- return false;-->
<!-- }-->
<!-- return true;-->
<!-- });-->
<!-- let formData = {};-->
<!-- const queryByIdUrl = '/test/test/queryById';-->
<!-- async function initFormData(){-->
<!-- let params = {id: props.formData.dataId};-->
<!-- const data = await defHttp.get({url: queryByIdUrl, params});-->
<!-- formData = {...data}-->
<!-- //设置表单的值-->
<!-- await setFieldsValue(formData);-->
<!-- //默认是禁用-->
<!-- await setProps({disabled: formDisabled.value})-->
<!-- }-->
<!-- async function submitForm() {-->
<!-- let data = getFieldsValue();-->
<!-- let params = Object.assign({}, formData, data);-->
<!-- console.log('表单数据', params)-->
<!-- await saveOrUpdate(params, true)-->
<!-- }-->
<!-- initFormData();-->
<!-- -->
<!-- return {-->
<!-- registerForm,-->
<!-- formDisabled,-->
<!-- submitForm,-->
<!-- }-->
<!-- }-->
<!-- });-->
<!--</script>-->
<!--<template>-->
<!-- <BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :width="800" @ok="handleSubmit">-->
<!-- <BasicForm @register="registerForm" name="TestForm" />-->
<!-- </BasicModal>-->
<!--</template>-->
<!--<script lang="ts" setup>-->
<!-- import {ref, computed, unref} from 'vue';-->
<!-- import {BasicModal, useModalInner} from '/@/components/Modal';-->
<!-- import {BasicForm, useForm} from '/@/components/Form/index';-->
<!-- import {formSchema} from '../ZdyRag.data';-->
<!-- import {saveOrUpdate} from '../ZdyRag.api';-->
<!-- // Emits声明-->
<!-- const emit = defineEmits(['register','success']);-->
<!-- const isUpdate = ref(true);-->
<!-- const isDetail = ref(false);-->
<!-- //表单配置-->
<!-- const [registerForm, { setProps,resetFields, setFieldsValue, validate, scrollToField }] = useForm({-->
<!-- labelWidth: 150,-->
<!-- schemas: formSchema,-->
<!-- showActionButtonGroup: false,-->
<!-- baseColProps: {span: 24}-->
<!-- });-->
<!-- //表单赋值-->
<!-- const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {-->
<!-- //重置表单-->
<!-- await resetFields();-->
<!-- setModalProps({confirmLoading: false,showCancelBtn:!!data?.showFooter,showOkBtn:!!data?.showFooter});-->
<!-- isUpdate.value = !!data?.isUpdate;-->
<!-- isDetail.value = !!data?.showFooter;-->
<!-- if (unref(isUpdate)) {-->
<!-- //表单赋值-->
<!-- await setFieldsValue({-->
<!-- ...data.record,-->
<!-- });-->
<!-- }-->
<!-- // 隐藏底部时禁用整个表单-->
<!-- setProps({ disabled: !data?.showFooter })-->
<!-- });-->
<!-- //设置标题-->
<!-- const title = computed(() => (!unref(isUpdate) ? '新增' : !unref(isDetail) ? '详情' : '编辑'));-->
<!-- //表单提交事件-->
<!-- async function handleSubmit(v) {-->
<!-- try {-->
<!-- let values = await validate();-->
<!-- setModalProps({confirmLoading: true});-->
<!-- //提交表单-->
<!-- await saveOrUpdate(values, isUpdate.value);-->
<!-- //关闭弹窗-->
<!-- closeModal();-->
<!-- //刷新列表-->
<!-- emit('success');-->
<!-- } catch ({ errorFields }) {-->
<!-- if (errorFields) {-->
<!-- const firstField = errorFields[0];-->
<!-- if (firstField) {-->
<!-- scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });-->
<!-- }-->
<!-- }-->
<!-- return Promise.reject(errorFields);-->
<!-- } finally {-->
<!-- setModalProps({confirmLoading: false});-->
<!-- }-->
<!-- }-->
<!--</script>-->
<!--<style lang="less" scoped>-->
<!-- /** 时间和数字输入框样式 */-->
<!-- :deep(.ant-input-number) {-->
<!-- width: 100%;-->
<!-- }-->
<!-- :deep(.ant-calendar-picker) {-->
<!-- width: 100%;-->
<!-- }-->
<!--</style>-->
... ... @@ -27,9 +27,9 @@
<div class="aui-flex-box" :class="activeIndex === 'accountLogin' ? 'activeNav on' : ''" @click="loginClick('accountLogin')"
>{{ t('sys.login.signInFormTitle') }}
</div>
<div class="aui-flex-box" :class="activeIndex === 'phoneLogin' ? 'activeNav on' : ''" @click="loginClick('phoneLogin')"
>{{ t('sys.login.mobileSignInFormTitle') }}
</div>
<!-- <div class="aui-flex-box" :class="activeIndex === 'phoneLogin' ? 'activeNav on' : ''" @click="loginClick('phoneLogin')"-->
<!-- >{{ t('sys.login.mobileSignInFormTitle') }}-->
<!-- </div>-->
</div>
<div class="aui-form-box" style="height: 180px">
<a-form ref="loginRef" :model="formData" v-if="activeIndex === 'accountLogin'" @keyup.enter.native="loginHandleClick">
... ... @@ -63,9 +63,9 @@
<span style="margin-left: 5px">{{ t('sys.login.rememberMe') }}</span>
</div>
</div>
<div class="aui-forget">
<a @click="forgetHandelClick"> {{ t('sys.login.forgetPassword') }}</a>
</div>
<!-- <div class="aui-forget">-->
<!-- <a @click="forgetHandelClick"> {{ t('sys.login.forgetPassword') }}</a>-->
<!-- </div>-->
</div>
</div>
</a-form>
... ... @@ -91,42 +91,42 @@
<a-button :loading="loginLoading" class="aui-link-login" type="primary" @click="loginHandleClick">
{{ t('sys.login.loginButton') }}</a-button>
</div>
<div class="aui-flex">
<a class="aui-linek-code aui-flex-box" @click="codeHandleClick">{{ t('sys.login.qrSignInFormTitle') }}</a>
</div>
<div class="aui-flex">
<a class="aui-linek-code aui-flex-box" @click="registerHandleClick">{{ t('sys.login.registerButton') }}</a>
</div>
<!-- <div class="aui-flex">-->
<!-- <a class="aui-linek-code aui-flex-box" @click="codeHandleClick">{{ t('sys.login.qrSignInFormTitle') }}</a>-->
<!-- </div>-->
<!-- <div class="aui-flex">-->
<!-- <a class="aui-linek-code aui-flex-box" @click="registerHandleClick">{{ t('sys.login.registerButton') }}</a>-->
<!-- </div>-->
</div>
</div>
<a-form @keyup.enter.native="loginHandleClick">
<div class="aui-flex aui-third-text">
<div class="aui-flex-box aui-third-border">
<span>{{ t('sys.login.otherSignIn') }}</span>
</div>
</div>
<div class="aui-flex" :class="`${prefixCls}-sign-in-way`">
<div class="aui-flex-box">
<div class="aui-third-login">
<a title="github" @click="onThirdLogin('github')"><GithubFilled /></a>
</div>
</div>
<div class="aui-flex-box">
<div class="aui-third-login">
<a title="企业微信" @click="onThirdLogin('wechat_enterprise')"><icon-font class="item-icon" type="icon-qiyeweixin3" /></a>
</div>
</div>
<div class="aui-flex-box">
<div class="aui-third-login">
<a title="钉钉" @click="onThirdLogin('dingtalk')"><DingtalkCircleFilled /></a>
</div>
</div>
<div class="aui-flex-box">
<div class="aui-third-login">
<a title="微信" @click="onThirdLogin('wechat_open')"><WechatFilled /></a>
</div>
</div>
</div>
<!-- <div class="aui-flex aui-third-text">-->
<!-- <div class="aui-flex-box aui-third-border">-->
<!-- <span>{{ t('sys.login.otherSignIn') }}</span>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="aui-flex" :class="`${prefixCls}-sign-in-way`">-->
<!-- <div class="aui-flex-box">-->
<!-- <div class="aui-third-login">-->
<!-- <a title="github" @click="onThirdLogin('github')"><GithubFilled /></a>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="aui-flex-box">-->
<!-- <div class="aui-third-login">-->
<!-- <a title="企业微信" @click="onThirdLogin('wechat_enterprise')"><icon-font class="item-icon" type="icon-qiyeweixin3" /></a>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="aui-flex-box">-->
<!-- <div class="aui-third-login">-->
<!-- <a title="钉钉" @click="onThirdLogin('dingtalk')"><DingtalkCircleFilled /></a>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="aui-flex-box">-->
<!-- <div class="aui-third-login">-->
<!-- <a title="微信" @click="onThirdLogin('wechat_open')"><WechatFilled /></a>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
</a-form>
</div>
</div>
... ...