Browse Source

打包优化+ bug修复

master
xueyinfei 3 weeks ago
parent
commit
2c5ebc59d5
  1. 2
      vue-fastapi-backend/app.py
  2. 3
      vue-fastapi-backend/config/env.py
  3. 1
      vue-fastapi-backend/requirements.txt
  4. 4
      vue-fastapi-frontend/src/views/aichat/Interrupt.vue
  5. 41
      vue-fastapi-frontend/src/views/aichat/aichat.vue
  6. 7
      vue-fastapi-frontend/src/views/dataint/dataquery/dataquerychat.vue
  7. 4
      vue-fastapi-frontend/src/views/meta/metaInfo/index.vue

2
vue-fastapi-backend/app.py

@ -8,5 +8,5 @@ if __name__ == '__main__':
host=AppConfig.app_host, host=AppConfig.app_host,
port=AppConfig.app_port, port=AppConfig.app_port,
root_path=AppConfig.app_root_path, root_path=AppConfig.app_root_path,
reload=AppConfig.app_reload, reload=False,
) )

3
vue-fastapi-backend/config/env.py

@ -208,12 +208,15 @@ class GetConfig:
run_env = os.environ.get('APP_ENV', '') run_env = os.environ.get('APP_ENV', '')
# 运行环境未指定时默认加载.env.dev # 运行环境未指定时默认加载.env.dev
env_file = os.path.join(Path(__file__).parent.parent.parent, '.env.prod') env_file = os.path.join(Path(__file__).parent.parent.parent, '.env.prod')
print(env_file)
# 运行环境不为空时按命令行参数加载对应.env文件 # 运行环境不为空时按命令行参数加载对应.env文件
if run_env != '': if run_env != '':
env_file = f'.env.{run_env}' env_file = f'.env.{run_env}'
else: else:
if not Path(env_file).exists(): if not Path(env_file).exists():
env_file = f'.env.dev' env_file = f'.env.dev'
else:
print("find file")
# 加载配置 # 加载配置
load_dotenv(env_file) load_dotenv(env_file)

1
vue-fastapi-backend/requirements.txt

@ -68,6 +68,7 @@ simplejson==3.20.1
six==1.17.0 six==1.17.0
sniffio==1.3.1 sniffio==1.3.1
SQLAlchemy==2.0.31 SQLAlchemy==2.0.31
sqlglot==28.5.0
sqlparse==0.5.3 sqlparse==0.5.3
starlette==0.38.6 starlette==0.38.6
typer==0.15.1 typer==0.15.1

4
vue-fastapi-frontend/src/views/aichat/Interrupt.vue

@ -15,7 +15,7 @@
<el-checkbox-group v-if="item.d_type === 'enum' && item.ct_type === 'checkboxGroup'" v-model="formData[item.name]" :disabled="item.read_only || !isLastChat"> <el-checkbox-group v-if="item.d_type === 'enum' && item.ct_type === 'checkboxGroup'" v-model="formData[item.name]" :disabled="item.read_only || !isLastChat">
<el-checkbox v-for="checkItem in item.options" :label="checkItem" :value="checkItem" /> <el-checkbox v-for="checkItem in item.options" :label="checkItem" :value="checkItem" />
</el-checkbox-group> </el-checkbox-group>
<el-select :teleported="false" v-if="item.d_type === 'enum' && item.ct_type === 'select'" v-model="formData[item.name]" :disabled="item.read_only || !isLastChat" :filterable="item.allow_create" :allow-create="item.allow_create"> <el-select :teleported="false" v-if="item.d_type === 'enum' && item.ct_type === 'select'" v-model="formData[item.name]" :disabled="item.read_only || !isLastChat" :filterable="true" :allow-create="item.allow_create">
<el-option <el-option
v-for="selectItem in item.options" v-for="selectItem in item.options"
:key="selectItem" :key="selectItem"
@ -23,7 +23,7 @@
:value="selectItem" :value="selectItem"
/> />
</el-select> </el-select>
<el-select :key="item.name" :teleported="false" v-if="item.d_type === 'enum' && item.ct_type === 'multiselect'" multiple v-model="formData[item.name]" :disabled="item.read_only || !isLastChat" :filterable="item.allow_create" :allow-create="item.allow_create"> <el-select :key="item.name" :teleported="false" v-if="item.d_type === 'enum' && item.ct_type === 'multiselect'" multiple v-model="formData[item.name]" :disabled="item.read_only || !isLastChat" :filterable="true" :allow-create="item.allow_create">
<el-option <el-option
v-for="selectItem in item.options" v-for="selectItem in item.options"
:key="selectItem" :key="selectItem"

41
vue-fastapi-frontend/src/views/aichat/aichat.vue

@ -34,6 +34,7 @@
<template #reference> <template #reference>
<div class="returnToHere" style="margin-top: 5px;margin-bottom: 5px"> <div class="returnToHere" style="margin-top: 5px;margin-bottom: 5px">
<i class="ri-bookmark-2-fill returnToHereIcon"></i> <i class="ri-bookmark-2-fill returnToHereIcon"></i>
<span v-if="item.interrupt && item.interrupt.robot">{{item.interrupt.robot}}</span>
<el-divider class="returnToHereDivider"> <el-divider class="returnToHereDivider">
<span class="divider-text">回到这里</span> <span class="divider-text">回到这里</span>
</el-divider> </el-divider>
@ -43,6 +44,7 @@
</el-popconfirm> </el-popconfirm>
<div v-else class="returnToHere" style="margin-top: 5px;margin-bottom: 5px"> <div v-else class="returnToHere" style="margin-top: 5px;margin-bottom: 5px">
<i class="ri-bookmark-2-fill returnToHereIcon"></i> <i class="ri-bookmark-2-fill returnToHereIcon"></i>
<span v-if="item.interrupt && item.interrupt.robot">{{item.interrupt.robot}}</span>
<el-divider class="returnToHereDivider"> <el-divider class="returnToHereDivider">
<!-- <span class="divider-text">回到这里</span>--> <!-- <span class="divider-text">回到这里</span>-->
</el-divider> </el-divider>
@ -132,30 +134,30 @@
<el-avatar style="width: 30px;height: 30px"><img src="@/assets/aichat/智能体logo.jpg"></el-avatar> <el-avatar style="width: 30px;height: 30px"><img src="@/assets/aichat/智能体logo.jpg"></el-avatar>
<span style="font-size: 16px;margin-left: 10px">数据标准专家</span> <span style="font-size: 16px;margin-left: 10px">数据标准专家</span>
</div> </div>
<div class="machineDiv" @click="chooseMachine('数据质量专家','@/assets/aichat/智能体logo.jpg')" style="align-items: center;width:100%;display: flex"> <!-- <div class="machineDiv" @click="chooseMachine('数据质量专家','@/assets/aichat/智能体logo.jpg')" style="align-items: center;width:100%;display: flex">-->
<el-avatar style="width: 30px;height: 30px"><img src="@/assets/aichat/智能体logo.jpg"></el-avatar> <!-- <el-avatar style="width: 30px;height: 30px"><img src="@/assets/aichat/智能体logo.jpg"></el-avatar>-->
<span style="font-size: 16px;margin-left: 10px">数据质量专家</span> <!-- <span style="font-size: 16px;margin-left: 10px">数据质量专家</span>-->
</div> <!-- </div>-->
<div class="machineDiv" @click="chooseMachine('数据模型专家','@/assets/aichat/智能体logo.jpg')" style="align-items: center;width:100%;display: flex"> <!-- <div class="machineDiv" @click="chooseMachine('数据模型专家','@/assets/aichat/智能体logo.jpg')" style="align-items: center;width:100%;display: flex">-->
<el-avatar style="width: 30px;height: 30px"><img src="@/assets/aichat/智能体logo.jpg"></el-avatar> <!-- <el-avatar style="width: 30px;height: 30px"><img src="@/assets/aichat/智能体logo.jpg"></el-avatar>-->
<span style="font-size: 16px;margin-left: 10px">数据模型专家</span> <!-- <span style="font-size: 16px;margin-left: 10px">数据模型专家</span>-->
</div> <!-- </div>-->
<div class="machineDiv" @click="chooseMachine('数据安全专家','@/assets/aichat/智能体logo.jpg')" style="align-items: center;width:100%;display: flex"> <div class="machineDiv" @click="chooseMachine('数据安全专家','@/assets/aichat/智能体logo.jpg')" style="align-items: center;width:100%;display: flex">
<el-avatar style="width: 30px;height: 30px"><img src="@/assets/aichat/智能体logo.jpg"></el-avatar> <el-avatar style="width: 30px;height: 30px"><img src="@/assets/aichat/智能体logo.jpg"></el-avatar>
<span style="font-size: 16px;margin-left: 10px">数据安全专家</span> <span style="font-size: 16px;margin-left: 10px">数据安全专家</span>
</div> </div>
<div class="machineDiv" @click="chooseMachine('数据分析专家','@/assets/aichat/智能体logo.jpg')" style="align-items: center;width:100%;display: flex"> <!-- <div class="machineDiv" @click="chooseMachine('数据分析专家','@/assets/aichat/智能体logo.jpg')" style="align-items: center;width:100%;display: flex">-->
<el-avatar style="width: 30px;height: 30px"><img src="@/assets/aichat/智能体logo.jpg"></el-avatar> <!-- <el-avatar style="width: 30px;height: 30px"><img src="@/assets/aichat/智能体logo.jpg"></el-avatar>-->
<span style="font-size: 16px;margin-left: 10px">数据分析专家</span> <!-- <span style="font-size: 16px;margin-left: 10px">数据分析专家</span>-->
</div> <!-- </div>-->
<div class="machineDiv" @click="chooseMachine('数据治理管理专家','@/assets/aichat/智能体logo.jpg')" style="align-items: center;width:100%;display: flex"> <div class="machineDiv" @click="chooseMachine('数据治理管理专家','@/assets/aichat/智能体logo.jpg')" style="align-items: center;width:100%;display: flex">
<el-avatar style="width: 30px;height: 30px"><img src="@/assets/aichat/智能体logo.jpg"></el-avatar> <el-avatar style="width: 30px;height: 30px"><img src="@/assets/aichat/智能体logo.jpg"></el-avatar>
<span style="font-size: 16px;margin-left: 10px">数据治理管理专家</span> <span style="font-size: 16px;margin-left: 10px">数据治理管理专家</span>
</div> </div>
<div class="machineDiv" @click="chooseMachine('智能导航专家','@/assets/aichat/智能体logo.jpg')" style="align-items: center;width:100%;display: flex"> <!-- <div class="machineDiv" @click="chooseMachine('智能导航专家','@/assets/aichat/智能体logo.jpg')" style="align-items: center;width:100%;display: flex">-->
<el-avatar style="width: 30px;height: 30px"><img src="@/assets/aichat/智能体logo.jpg"></el-avatar> <!-- <el-avatar style="width: 30px;height: 30px"><img src="@/assets/aichat/智能体logo.jpg"></el-avatar>-->
<span style="font-size: 16px;margin-left: 10px">智能导航专家</span> <!-- <span style="font-size: 16px;margin-left: 10px">智能导航专家</span>-->
</div> <!-- </div>-->
</el-scrollbar> </el-scrollbar>
</div> </div>
</template> </template>
@ -299,9 +301,10 @@ const controller = ref(null)
const currentChatData = ref({}) const currentChatData = ref({})
const autoProcess = ref({ const autoProcess = ref({
checkAll: false, checkAll: false,
isIndeterminate: false, isIndeterminate: true,
autoArray:[], autoArray:['数据治理管理专家'],
robots:['数据治理管理专家','元数据专家','数据标准专家','数据安全专家','数据分析专家','数据模型专家','数据质量专家','智能导航专家'], robots:['数据治理管理专家','元数据专家','数据标准专家','数据安全专家']
// ,'','','',''],
}) })
const popoverVisible = ref(false) const popoverVisible = ref(false)
const currentMachine = ref([]) const currentMachine = ref([])

7
vue-fastapi-frontend/src/views/dataint/dataquery/dataquerychat.vue

@ -91,7 +91,12 @@
</el-form-item> </el-form-item>
<el-form-item v-if="item.content.result.length > 0" label="输出结果:"> <el-form-item v-if="item.content.result.length > 0" label="输出结果:">
<span v-for="result in item.content.result">{{result.name}}</span> <template v-for="(result,index) in item.content.result">
<span v-if="index === 0">{{'1.'+ result.name}}</span>
<template v-if="index > 0">
<br><span>{{(index+1) +'.'+result.name}}</span>
</template>
</template>
</el-form-item> </el-form-item>
<el-form-item label="数据结果:"> <el-form-item label="数据结果:">
<template v-if="item.content.data"> <template v-if="item.content.data">

4
vue-fastapi-frontend/src/views/meta/metaInfo/index.vue

@ -744,7 +744,9 @@
style="width: 240px" style="width: 240px"
@change="changeAstTag" @change="changeAstTag"
> >
<el-option v-for="item in metaClasList" :key="item.clasOnum" :value="item.clasOnum" :label="item.clasOnum+' - '+item.clasName"/> <template v-for="item in metaClasList">
<el-option v-if="item.clasOnum && (item.clasOnum+'')[0] === '1'" :key="item.clasOnum" :value="item.clasOnum" :label="item.clasOnum+' - '+item.clasName"/>
</template>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>

Loading…
Cancel
Save