Gaokun Wang 3 mēneši atpakaļ
vecāks
revīzija
9921fbca01

+ 1 - 1
.env.development

@@ -5,4 +5,4 @@ ENV = 'development'
 # 开发环境
 VUE_APP_BASE_API ='/api'
 
-VUE_APP_BASE_API_target ='http://localhost:9091'
+VUE_APP_BASE_API_target ='http://192.168.2.10:9091'

+ 1 - 1
.env.production

@@ -6,4 +6,4 @@ ENV = 'production'
 
 VUE_APP_BASE_API ='/api'
 
-VUE_APP_BASE_API_target ='http://localhost:8080' # 生产环境地址
+VUE_APP_BASE_API_target ='http://192.168.2.10:8080' # 生产环境地址

+ 1 - 0
public/index.html

@@ -6,6 +6,7 @@
     <meta name="viewport" content="width=device-width,initial-scale=1.0" />
     <link rel="icon" href="<%= BASE_URL %>favicon.ico" />
     <title>灵巧敏捷保障软件系统</title>
+    <!-- <title>大气数据处理软件</title> -->
     <!-- <title><%= htmlWebpackPlugin.options.title %></title> -->
   </head>
   <body>

+ 3 - 3
src/api/als/dataImport.js

@@ -1,4 +1,4 @@
-import { get, put, post, deletes } from '@/http/index'
+import { get, put, post, postFile, deletes } from '@/http/index'
 
 // 查询数据导入信息列表
 export const getDataImport = async (data) => {
@@ -34,8 +34,8 @@ export const getAircaftTypeAndModelTree = async (data) => {
  * @name 下载模板
  * @returns returns
  */
-export const importTemplateApi = () => {
-  return http.postFile('/als/dataImport/importTemplate', {})
+export const importTemplateApi = async () => {
+  return await postFile('/als/warning/importTemplate', {})
 }
 
 /**

+ 1 - 0
src/layout/components/NavBar/index.vue

@@ -3,6 +3,7 @@
     <div class="nav-bar-logo">
       <!-- <img :src="logo" alt="" /> -->
       灵 巧 敏 捷 保 障 软 件 系 统
+      <!-- 大 气 数 据 处 理 软 件 -->
     </div>
     <div class="nav-bar-logo-bg"></div>
     <div class="nav-bar-menu">

+ 1 - 3
src/views/als/falseAlarm/index.vue

@@ -35,9 +35,7 @@
           <PlayBackChart :chartData="chartData" />
           <div style="margin-top: 20px">
             <span style="color: #fff; margin-left: 30px">请选择时间区间:</span>
-            <el-date-picker v-model="mathTime" placement="bottom-start" value-format="yyyy-MM-dd HH:mm:ss.SSS" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="handleMathTime" :clearable="false">
-            </el-date-picker>
-
+            <el-time-picker is-range v-model="mathTime" placement="bottom-start" value-format="HH:mm:ss.SSS" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" @change="handleMathTime" :clearable="false"></el-time-picker>
             <el-button icon="el-icon-refresh" circle class="refresh" @click="resetTime"></el-button>
             <el-button type="success" @click="getExecuteMathAPI" style="margin-left: 15px">确 定</el-button>
             <LTable ref="mathTable" :defaultFetch="false" :columns="mathColumns" :dataSource="mathTableData" :options="mathOptions"></LTable>

+ 1 - 1
src/views/als/flightData/index.vue

@@ -97,7 +97,7 @@ import { getAircaftCatalogTree } from '@/api/als/sideTree'
 import { getAircaftCatalogAll } from '@/api/als/aircraft'
 import { deepClone, debounce } from '@/utils/index'
 import FileUpload from '@/views/als/components/FileUpload'
-import { flattenTree, download } from '../utils/common'
+import { flattenTree, useDownload } from '../utils/common'
 import { getItem } from '@/utils/index'
 import { getWarning } from '@/api/als/warning'
 

+ 4 - 4
src/views/als/index.scss

@@ -58,8 +58,8 @@
   }
 }
 
-::-webkit-scrollbar {
-  /*滚动条整体样式*/
-  display: none;
-}
+// ::-webkit-scrollbar {
+//   /*滚动条整体样式*/
+//   display: none;
+// }
 

+ 5 - 0
src/views/als/intelligentQA/index.scss

@@ -166,6 +166,11 @@
         margin: 20px 0;
         margin-left: 30px;
         line-height: 1.8rem;
+        .think{
+          color: #898989;
+          font-size: 0.8rem;
+          line-height: 1.5rem;
+        }
       }
       .markdown{
         color: #c0c0c0;

+ 25 - 12
src/views/als/intelligentQA/index.vue

@@ -44,7 +44,9 @@
                       </div>
                     </el-collapse-item>
                   </el-collapse>
-                  <div style="margin-top: 10px">{{ item.llmAnswer.answer }}</div>
+                  <!-- <div style="margin-top: 10px">{{ item.llmAnswer.answer }}</div> -->
+                  <div v-if="item.llmAnswer.think" class="think" v-html="renderMarkdown(item.llmAnswer.think)"></div>
+                  <div style="margin-top: 10px" v-html="renderMarkdown(item.llmAnswer.answer)"></div>
                 </div>
               </div>
               <!-- sql -->
@@ -156,15 +158,28 @@ export default {
       filePage: '2',
       fileTotalPage: null,
       sqlAnswerKey: [],
-      collapseActiveNames: []
+      collapseActiveNames: [],
+      main: null,
+      askUrl: '/als/algorithm/execute/qa'
     }
   },
   mounted() {
+    this.main = document.getElementsByClassName('main')[0]
     this.getHistoryAll()
     this.getGroupAPI()
     this.adjustHeight()
   },
-  watch: {},
+  watch: {
+    chatInfo: {
+      handler() {
+        // 当原始列变化时,更新本地列
+        setTimeout(() => {
+          this.main.scrollTop = this.main.scrollHeight
+        }, 0)
+      },
+      deep: true
+    }
+  },
   created() {},
   methods: {
     adjustHeight() {
@@ -222,7 +237,8 @@ export default {
 
     async sendQuestion() {
       // 等处理过返回数据后,调用使视图保持在最底部
-      let main = this.$refs.main
+      // let main = this.$refs.main
+      // let main = document.getElementsByClassName('main')
       const sendInput = {
         question: this.questionInput,
         userId: String(store.state.user.userInfo.user.userId)
@@ -235,6 +251,10 @@ export default {
           answer: '正在解析您的问题,请稍后......'
         })
         this.questionInput = ''
+        // const eventSource = new EventSource(this.askUrl)
+        // eventSource.onmessage = (event) => {
+        //   console.log('数据', event.data)
+        // }
         const { code, data } = await handlerAsk(sendInput)
         if (code == 200) {
           const newData = this.handleData(JSON.parse(data))
@@ -244,14 +264,7 @@ export default {
 
           // 获取sql回答的键
           this.sqlAnswerKey = Object.keys(JSON.parse(data).sqlAnswer[0])
-          setTimeout(() => {
-            main.scrollTop = main.scrollHeight
-          }, 0)
         }
-
-        setTimeout(() => {
-          main.scrollTop = main.scrollHeight
-        }, 0)
       } catch (error) {}
     },
 
@@ -274,7 +287,7 @@ export default {
     },
 
     handleMore(data) {
-      this.getListById(data.ossId)
+      this.getListById(data.graphAnswer.ossId)
       this.moreData = data
       this.dialogVisible = true
     },

+ 1 - 0
src/views/login/index.vue

@@ -3,6 +3,7 @@
     <div class="aside">
       <div class="aside-h">
         <h1>灵 巧 敏 捷 保 障 软 件 系 统</h1>
+        <!-- <h1>大 气 数 据 处 理 软 件</h1> -->
       </div>
       <el-form label-position="right" label-width="60px" ref="ruleForm" :model="ruleForm" :rules="rules" :hide-required-asterisk="true" class="login-form">
         <el-form-item prop="username" label="用户名">

+ 4 - 4
vue.config.js

@@ -8,7 +8,7 @@ module.exports = defineConfig({
     open: true, //值为 true的话,项目启动时自动打开到浏览器里边, false不会打开
     proxy: {
       ['/api/als']: {
-        target: 'http://localhost:9090',
+        target: 'http://192.168.2.10:9090',
         ws: false,
         changeOrigin: true,
         pathRewrite: {
@@ -16,8 +16,8 @@ module.exports = defineConfig({
         }
       },
       ['/api/kgqa']: {
-        target: 'http://192.168.0.107:7073',
-        // target: 'http://localhost:7073',
+        // target: 'http://192.168.0.107:7073',
+        target: 'http://192.168.2.120:7073',
         ws: false,
         changeOrigin: true,
         pathRewrite: {
@@ -25,7 +25,7 @@ module.exports = defineConfig({
         }
       },
       ['/api/knowledge_base']: {
-        target: 'http://192.168.0.107:7861',
+        target: 'http://192.168.2.120:7861',
         ws: false,
         changeOrigin: true,
         pathRewrite: {