作者 lixiang

模型参数修改

@@ -2,10 +2,10 @@ @@ -2,10 +2,10 @@
2 VITE_PORT = 3100 2 VITE_PORT = 3100
3 3
4 # 网站标题 4 # 网站标题
5 -VITE_GLOB_APP_TITLE = JeecgBoot 企业级低代码平台 5 +VITE_GLOB_APP_TITLE = RAG智能问答系统
6 6
7 # 简称,此变量只能是字符/下划线 7 # 简称,此变量只能是字符/下划线
8 -VITE_GLOB_APP_SHORT_NAME = JeecgBoot_Pro 8 +VITE_GLOB_APP_SHORT_NAME = RAG智能问答系统
9 9
10 # 单点登录服务端地址 10 # 单点登录服务端地址
11 VITE_GLOB_APP_CAS_BASE_URL=http://cas.test.com:8443/cas 11 VITE_GLOB_APP_CAS_BASE_URL=http://cas.test.com:8443/cas
@@ -16,7 +16,7 @@ VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false @@ -16,7 +16,7 @@ VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false
16 VITE_GLOB_API_URL=/jeecgboot 16 VITE_GLOB_API_URL=/jeecgboot
17 17
18 #后台接口全路径地址(必填) 18 #后台接口全路径地址(必填)
19 -VITE_GLOB_DOMAIN_URL=http://jeecg-boot-system:8080/jeecg-boot 19 +VITE_GLOB_DOMAIN_URL=http://192.168.100.5:8080
20 20
21 # 接口父路径前缀 21 # 接口父路径前缀
22 VITE_GLOB_API_URL_PREFIX= 22 VITE_GLOB_API_URL_PREFIX=
@@ -61,7 +61,7 @@ export default { @@ -61,7 +61,7 @@ export default {
61 }, 61 },
62 login: { 62 login: {
63 backSignIn: '返回', 63 backSignIn: '返回',
64 - signInFormTitle: '登录', 64 + signInFormTitle: 'RAG智能问答系统登录',
65 mobileSignInFormTitle: '手机登录', 65 mobileSignInFormTitle: '手机登录',
66 qrSignInFormTitle: '二维码登录', 66 qrSignInFormTitle: '二维码登录',
67 signUpFormTitle: '注册', 67 signUpFormTitle: '注册',
@@ -28,6 +28,7 @@ @@ -28,6 +28,7 @@
28 @cancel="handleImportCancel" 28 @cancel="handleImportCancel"
29 width="600px" 29 width="600px"
30 :okButtonProps="{ disabled: !selectedKnowledgeId || !currentFile }" 30 :okButtonProps="{ disabled: !selectedKnowledgeId || !currentFile }"
  31 + :confirmLoading="loading"
31 > 32 >
32 <BasicForm @register="registerImportForm" :showActionButtonGroup="false" /> 33 <BasicForm @register="registerImportForm" :showActionButtonGroup="false" />
33 <div style="margin-top: 20px; margin-left: 5%"> 34 <div style="margin-top: 20px; margin-left: 5%">
@@ -61,6 +62,7 @@ @@ -61,6 +62,7 @@
61 const queryParam = reactive<any>({}); 62 const queryParam = reactive<any>({});
62 const [registerModal, { openModal }] = useModal(); 63 const [registerModal, { openModal }] = useModal();
63 const importModalVisible = ref(false); 64 const importModalVisible = ref(false);
  65 + const loading = ref(false);
64 const selectedKnowledgeId = ref(''); 66 const selectedKnowledgeId = ref('');
65 const fileInput = ref<HTMLInputElement | null>(null); 67 const fileInput = ref<HTMLInputElement | null>(null);
66 const currentFile = ref<File | null>(null); 68 const currentFile = ref<File | null>(null);
@@ -189,7 +191,7 @@ @@ -189,7 +191,7 @@
189 message.warning('请完整填写上传信息'); 191 message.warning('请完整填写上传信息');
190 return; 192 return;
191 } 193 }
192 - 194 + loading.value = true;
193 const formData = new FormData(); 195 const formData = new FormData();
194 formData.append('file', currentFile.value, currentFile.value.name); 196 formData.append('file', currentFile.value, currentFile.value.name);
195 formData.append('knowledgeId', selectedKnowledgeId.value); 197 formData.append('knowledgeId', selectedKnowledgeId.value);
@@ -223,6 +225,7 @@ @@ -223,6 +225,7 @@
223 if (result.success) { 225 if (result.success) {
224 message.success('上传成功'); 226 message.success('上传成功');
225 importModalVisible.value = false; 227 importModalVisible.value = false;
  228 +
226 handleSuccess(); 229 handleSuccess();
227 } else { 230 } else {
228 throw new Error(result.message || '上传处理失败'); 231 throw new Error(result.message || '上传处理失败');
@@ -231,6 +234,8 @@ @@ -231,6 +234,8 @@
231 uploadStatus.value = 'exception'; 234 uploadStatus.value = 'exception';
232 message.error(error.message || '上传失败'); 235 message.error(error.message || '上传失败');
233 console.error('上传错误:', error); 236 console.error('上传错误:', error);
  237 + } finally {
  238 + loading.value = false;
234 } 239 }
235 } 240 }
236 241
@@ -224,7 +224,7 @@ const sendButtonMessage = async (buttonValue: string) => { @@ -224,7 +224,7 @@ const sendButtonMessage = async (buttonValue: string) => {
224 }; 224 };
225 messages.push(newMessage); 225 messages.push(newMessage);
226 } else { 226 } else {
227 - // createMessage.error('获取回答失败: 返回数据为空'); 227 + console.error('获取回答失败: 返回数据为空');
228 } 228 }
229 } catch (error: any) { 229 } catch (error: any) {
230 console.error('发送按钮消息失败:', error); 230 console.error('发送按钮消息失败:', error);
1 -<!--<template>-->  
2 -<!-- <div style="min-height: 400px">-->  
3 -<!-- <BasicForm @register="registerForm"></BasicForm>-->  
4 -<!-- <div style="width: 100%;text-align: center" v-if="!formDisabled">-->  
5 -<!-- <a-button @click="submitForm" pre-icon="ant-design:check" type="primary">提 交</a-button>-->  
6 -<!-- </div>-->  
7 -<!-- </div>-->  
8 -<!--</template>-->  
9 -  
10 -<!--<script lang="ts">-->  
11 -<!-- import {BasicForm, useForm} from '/@/components/Form/index';-->  
12 -<!-- import {computed, defineComponent} from 'vue';-->  
13 -<!-- import {defHttp} from '/@/utils/http/axios';-->  
14 -<!-- import { propTypes } from '/@/utils/propTypes';-->  
15 -<!-- import {getBpmFormSchema} from '../ZdyRag.data';-->  
16 -<!-- import {saveOrUpdate} from '../ZdyRag.api';-->  
17 -<!-- -->  
18 -<!-- export default defineComponent({-->  
19 -<!-- name: "TestForm",-->  
20 -<!-- components:{-->  
21 -<!-- BasicForm-->  
22 -<!-- },-->  
23 -<!-- props:{-->  
24 -<!-- formData: propTypes.object.def({}),-->  
25 -<!-- formBpm: propTypes.bool.def(true),-->  
26 -<!-- },-->  
27 -<!-- setup(props){-->  
28 -<!-- const [registerForm, { setFieldsValue, setProps, getFieldsValue }] = useForm({-->  
29 -<!-- labelWidth: 150,-->  
30 -<!-- schemas: getBpmFormSchema(props.formData),-->  
31 -<!-- showActionButtonGroup: false,-->  
32 -<!-- baseColProps: {span: 24}-->  
33 -<!-- });-->  
34 -  
35 -<!-- const formDisabled = computed(()=>{-->  
36 -<!-- if(props.formData.disabled === false){-->  
37 -<!-- return false;-->  
38 -<!-- }-->  
39 -<!-- return true;-->  
40 -<!-- });-->  
41 -  
42 -<!-- let formData = {};-->  
43 -<!-- const queryByIdUrl = '/test/test/queryById';-->  
44 -<!-- async function initFormData(){-->  
45 -<!-- let params = {id: props.formData.dataId};-->  
46 -<!-- const data = await defHttp.get({url: queryByIdUrl, params});-->  
47 -<!-- formData = {...data}-->  
48 -<!-- //设置表单的值-->  
49 -<!-- await setFieldsValue(formData);-->  
50 -<!-- //默认是禁用-->  
51 -<!-- await setProps({disabled: formDisabled.value})-->  
52 -<!-- }-->  
53 -  
54 -<!-- async function submitForm() {-->  
55 -<!-- let data = getFieldsValue();-->  
56 -<!-- let params = Object.assign({}, formData, data);-->  
57 -<!-- console.log('表单数据', params)-->  
58 -<!-- await saveOrUpdate(params, true)-->  
59 -<!-- }-->  
60 -  
61 -<!-- initFormData();-->  
62 -<!-- -->  
63 -<!-- return {-->  
64 -<!-- registerForm,-->  
65 -<!-- formDisabled,-->  
66 -<!-- submitForm,-->  
67 -<!-- }-->  
68 -<!-- }-->  
69 -<!-- });-->  
70 -<!--</script>-->  
1 -<!--<template>-->  
2 -<!-- <BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :width="800" @ok="handleSubmit">-->  
3 -<!-- <BasicForm @register="registerForm" name="TestForm" />-->  
4 -<!-- </BasicModal>-->  
5 -<!--</template>-->  
6 -  
7 -<!--<script lang="ts" setup>-->  
8 -<!-- import {ref, computed, unref} from 'vue';-->  
9 -<!-- import {BasicModal, useModalInner} from '/@/components/Modal';-->  
10 -<!-- import {BasicForm, useForm} from '/@/components/Form/index';-->  
11 -<!-- import {formSchema} from '../ZdyRag.data';-->  
12 -<!-- import {saveOrUpdate} from '../ZdyRag.api';-->  
13 -<!-- // Emits声明-->  
14 -<!-- const emit = defineEmits(['register','success']);-->  
15 -<!-- const isUpdate = ref(true);-->  
16 -<!-- const isDetail = ref(false);-->  
17 -<!-- //表单配置-->  
18 -<!-- const [registerForm, { setProps,resetFields, setFieldsValue, validate, scrollToField }] = useForm({-->  
19 -<!-- labelWidth: 150,-->  
20 -<!-- schemas: formSchema,-->  
21 -<!-- showActionButtonGroup: false,-->  
22 -<!-- baseColProps: {span: 24}-->  
23 -<!-- });-->  
24 -<!-- //表单赋值-->  
25 -<!-- const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {-->  
26 -<!-- //重置表单-->  
27 -<!-- await resetFields();-->  
28 -<!-- setModalProps({confirmLoading: false,showCancelBtn:!!data?.showFooter,showOkBtn:!!data?.showFooter});-->  
29 -<!-- isUpdate.value = !!data?.isUpdate;-->  
30 -<!-- isDetail.value = !!data?.showFooter;-->  
31 -<!-- if (unref(isUpdate)) {-->  
32 -<!-- //表单赋值-->  
33 -<!-- await setFieldsValue({-->  
34 -<!-- ...data.record,-->  
35 -<!-- });-->  
36 -<!-- }-->  
37 -<!-- // 隐藏底部时禁用整个表单-->  
38 -<!-- setProps({ disabled: !data?.showFooter })-->  
39 -<!-- });-->  
40 -<!-- //设置标题-->  
41 -<!-- const title = computed(() => (!unref(isUpdate) ? '新增' : !unref(isDetail) ? '详情' : '编辑'));-->  
42 -<!-- //表单提交事件-->  
43 -<!-- async function handleSubmit(v) {-->  
44 -<!-- try {-->  
45 -<!-- let values = await validate();-->  
46 -<!-- setModalProps({confirmLoading: true});-->  
47 -<!-- //提交表单-->  
48 -<!-- await saveOrUpdate(values, isUpdate.value);-->  
49 -<!-- //关闭弹窗-->  
50 -<!-- closeModal();-->  
51 -<!-- //刷新列表-->  
52 -<!-- emit('success');-->  
53 -<!-- } catch ({ errorFields }) {-->  
54 -<!-- if (errorFields) {-->  
55 -<!-- const firstField = errorFields[0];-->  
56 -<!-- if (firstField) {-->  
57 -<!-- scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });-->  
58 -<!-- }-->  
59 -<!-- }-->  
60 -<!-- return Promise.reject(errorFields);-->  
61 -<!-- } finally {-->  
62 -<!-- setModalProps({confirmLoading: false});-->  
63 -<!-- }-->  
64 -<!-- }-->  
65 -<!--</script>-->  
66 -  
67 -<!--<style lang="less" scoped>-->  
68 -<!-- /** 时间和数字输入框样式 */-->  
69 -<!-- :deep(.ant-input-number) {-->  
70 -<!-- width: 100%;-->  
71 -<!-- }-->  
72 -  
73 -<!-- :deep(.ant-calendar-picker) {-->  
74 -<!-- width: 100%;-->  
75 -<!-- }-->  
76 -<!--</style>-->  
@@ -27,9 +27,9 @@ @@ -27,9 +27,9 @@
27 <div class="aui-flex-box" :class="activeIndex === 'accountLogin' ? 'activeNav on' : ''" @click="loginClick('accountLogin')" 27 <div class="aui-flex-box" :class="activeIndex === 'accountLogin' ? 'activeNav on' : ''" @click="loginClick('accountLogin')"
28 >{{ t('sys.login.signInFormTitle') }} 28 >{{ t('sys.login.signInFormTitle') }}
29 </div> 29 </div>
30 - <div class="aui-flex-box" :class="activeIndex === 'phoneLogin' ? 'activeNav on' : ''" @click="loginClick('phoneLogin')"  
31 - >{{ t('sys.login.mobileSignInFormTitle') }}  
32 - </div> 30 +<!-- <div class="aui-flex-box" :class="activeIndex === 'phoneLogin' ? 'activeNav on' : ''" @click="loginClick('phoneLogin')"-->
  31 +<!-- >{{ t('sys.login.mobileSignInFormTitle') }}-->
  32 +<!-- </div>-->
33 </div> 33 </div>
34 <div class="aui-form-box" style="height: 180px"> 34 <div class="aui-form-box" style="height: 180px">
35 <a-form ref="loginRef" :model="formData" v-if="activeIndex === 'accountLogin'" @keyup.enter.native="loginHandleClick"> 35 <a-form ref="loginRef" :model="formData" v-if="activeIndex === 'accountLogin'" @keyup.enter.native="loginHandleClick">
@@ -63,9 +63,9 @@ @@ -63,9 +63,9 @@
63 <span style="margin-left: 5px">{{ t('sys.login.rememberMe') }}</span> 63 <span style="margin-left: 5px">{{ t('sys.login.rememberMe') }}</span>
64 </div> 64 </div>
65 </div> 65 </div>
66 - <div class="aui-forget">  
67 - <a @click="forgetHandelClick"> {{ t('sys.login.forgetPassword') }}</a>  
68 - </div> 66 +<!-- <div class="aui-forget">-->
  67 +<!-- <a @click="forgetHandelClick"> {{ t('sys.login.forgetPassword') }}</a>-->
  68 +<!-- </div>-->
69 </div> 69 </div>
70 </div> 70 </div>
71 </a-form> 71 </a-form>
@@ -91,42 +91,42 @@ @@ -91,42 +91,42 @@
91 <a-button :loading="loginLoading" class="aui-link-login" type="primary" @click="loginHandleClick"> 91 <a-button :loading="loginLoading" class="aui-link-login" type="primary" @click="loginHandleClick">
92 {{ t('sys.login.loginButton') }}</a-button> 92 {{ t('sys.login.loginButton') }}</a-button>
93 </div> 93 </div>
94 - <div class="aui-flex">  
95 - <a class="aui-linek-code aui-flex-box" @click="codeHandleClick">{{ t('sys.login.qrSignInFormTitle') }}</a>  
96 - </div>  
97 - <div class="aui-flex">  
98 - <a class="aui-linek-code aui-flex-box" @click="registerHandleClick">{{ t('sys.login.registerButton') }}</a>  
99 - </div> 94 +<!-- <div class="aui-flex">-->
  95 +<!-- <a class="aui-linek-code aui-flex-box" @click="codeHandleClick">{{ t('sys.login.qrSignInFormTitle') }}</a>-->
  96 +<!-- </div>-->
  97 +<!-- <div class="aui-flex">-->
  98 +<!-- <a class="aui-linek-code aui-flex-box" @click="registerHandleClick">{{ t('sys.login.registerButton') }}</a>-->
  99 +<!-- </div>-->
100 </div> 100 </div>
101 </div> 101 </div>
102 <a-form @keyup.enter.native="loginHandleClick"> 102 <a-form @keyup.enter.native="loginHandleClick">
103 - <div class="aui-flex aui-third-text">  
104 - <div class="aui-flex-box aui-third-border">  
105 - <span>{{ t('sys.login.otherSignIn') }}</span>  
106 - </div>  
107 - </div>  
108 - <div class="aui-flex" :class="`${prefixCls}-sign-in-way`">  
109 - <div class="aui-flex-box">  
110 - <div class="aui-third-login">  
111 - <a title="github" @click="onThirdLogin('github')"><GithubFilled /></a>  
112 - </div>  
113 - </div>  
114 - <div class="aui-flex-box">  
115 - <div class="aui-third-login">  
116 - <a title="企业微信" @click="onThirdLogin('wechat_enterprise')"><icon-font class="item-icon" type="icon-qiyeweixin3" /></a>  
117 - </div>  
118 - </div>  
119 - <div class="aui-flex-box">  
120 - <div class="aui-third-login">  
121 - <a title="钉钉" @click="onThirdLogin('dingtalk')"><DingtalkCircleFilled /></a>  
122 - </div>  
123 - </div>  
124 - <div class="aui-flex-box">  
125 - <div class="aui-third-login">  
126 - <a title="微信" @click="onThirdLogin('wechat_open')"><WechatFilled /></a>  
127 - </div>  
128 - </div>  
129 - </div> 103 +<!-- <div class="aui-flex aui-third-text">-->
  104 +<!-- <div class="aui-flex-box aui-third-border">-->
  105 +<!-- <span>{{ t('sys.login.otherSignIn') }}</span>-->
  106 +<!-- </div>-->
  107 +<!-- </div>-->
  108 +<!-- <div class="aui-flex" :class="`${prefixCls}-sign-in-way`">-->
  109 +<!-- <div class="aui-flex-box">-->
  110 +<!-- <div class="aui-third-login">-->
  111 +<!-- <a title="github" @click="onThirdLogin('github')"><GithubFilled /></a>-->
  112 +<!-- </div>-->
  113 +<!-- </div>-->
  114 +<!-- <div class="aui-flex-box">-->
  115 +<!-- <div class="aui-third-login">-->
  116 +<!-- <a title="企业微信" @click="onThirdLogin('wechat_enterprise')"><icon-font class="item-icon" type="icon-qiyeweixin3" /></a>-->
  117 +<!-- </div>-->
  118 +<!-- </div>-->
  119 +<!-- <div class="aui-flex-box">-->
  120 +<!-- <div class="aui-third-login">-->
  121 +<!-- <a title="钉钉" @click="onThirdLogin('dingtalk')"><DingtalkCircleFilled /></a>-->
  122 +<!-- </div>-->
  123 +<!-- </div>-->
  124 +<!-- <div class="aui-flex-box">-->
  125 +<!-- <div class="aui-third-login">-->
  126 +<!-- <a title="微信" @click="onThirdLogin('wechat_open')"><WechatFilled /></a>-->
  127 +<!-- </div>-->
  128 +<!-- </div>-->
  129 +<!-- </div>-->
130 </a-form> 130 </a-form>
131 </div> 131 </div>
132 </div> 132 </div>