Bladeren bron

智能分析

张涛 1 jaar geleden
bovenliggende
commit
bbb8765c22
5 gewijzigde bestanden met toevoegingen van 34 en 4 verwijderingen
  1. 2 2
      src/components/DocumentCards.vue
  2. 8 0
      src/utils/config.js
  3. 1 1
      src/views/DocumentAnswer.vue
  4. 19 0
      src/views/DocumentsmartData.vue
  5. 4 1
      src/views/Home.vue

+ 2 - 2
src/components/DocumentCards.vue

@@ -14,7 +14,7 @@
         showDeleteTooltip = false;
       }
         ">
-        <!-- <div :class="{ 'text-hide': showUpload }">
+        <div :class="{ 'text-hide': showUpload }">
           <div @click="() => {
             showUpload = true;
           }
@@ -24,7 +24,7 @@
             <img src="@/assets/document/5.svg" class="img-active" v-if="showUpload" />
           </div>
           <p>已选择 {{ fileList.length }} 个文档</p>
-        </div> -->
+        </div>
         <template #content>
           <div :class="{ 'upload-wrap': true, 'upload-wrap-narrow': uploadFile }">
             <header>

+ 8 - 0
src/utils/config.js

@@ -42,5 +42,13 @@ export default {
             desc: "能够理解和学习人类的语言,具备多轮对话的能力",
             dialog: "我可以理解和学习人类的语言,具备多轮对话的能力,现在和我开始交流吧~"
         },
+        {
+            id: 5,
+            title: "智能数据",
+            icon: "8",
+            img: "/src/assets/index/8.png",
+            desc: "您可以上传文档或添加数据库地址,小数可针对你文档的数据进行分析,并生成指定的图表",
+            dialog: "您可以上传文档或添加数据库地址,小数可针对你文档的数据进行分析,并生成指定的图表"
+        },
     ]
 };

+ 1 - 1
src/views/DocumentAnswer.vue

@@ -1,5 +1,5 @@
 <template>
-    <document-cards :hasUpload="true" :uploadFile="true" :data="data" :hasSlider="false" :agentId="agentId" />
+    <document-cards :hasUpload="false" :uploadFile="true" :data="data" :hasSlider="false" :agentId="agentId" />
 </template>
 <script>
 import DocumentCards from "@/components/DocumentCards.vue";

+ 19 - 0
src/views/DocumentsmartData.vue

@@ -0,0 +1,19 @@
+<template>
+    <document-cards :hasUpload="true" :uploadFile="true" :data="data" :hasSlider="false" :agentId="agentId" />
+</template>
+<script>
+import DocumentCards from "@/components/DocumentCards.vue";
+import { defineComponent, ref, inject, reactive } from "vue";
+export default defineComponent({
+    components: {
+        DocumentCards
+    },
+    props: ["agentId"],
+    setup() {
+        const data = ref([]);
+        return {
+            data
+        };
+    }
+});
+</script>

+ 4 - 1
src/views/Home.vue

@@ -34,6 +34,8 @@
               <DocumentAnswer v-if="navId === 3 && !showDialog" :agentId="selectId" />
               <!-- 智能问答 -->
               <Answer v-if="navId === 4 && !showDialog" />
+              <!-- 智能数据 -->
+              <DocumentsmartData v-if="navId === 5 && !showDialog" :agentId="selectId" />
               <!-- 文库详情 -->
               <DocumentDetail v-if="navId === -2" @go-back="goBack" />
               <dialog-wrap v-if="showDialog && initDialog" v-show="!hideDialog" :type="dialogType[navId]"
@@ -151,6 +153,7 @@ import Answer from "./Answer.vue";
 import Document from "./Document.vue";
 import PicArticle from "./PicArticle.vue";
 import DocumentAnswer from "./DocumentAnswer.vue";
+import DocumentsmartData from "./DocumentsmartData.vue";
 import DocumentQuestion from "./DocumentQuestion.vue";
 import Analysis from "./Analysis.vue";
 import { defineComponent, ref, onMounted, inject, onBeforeUnmount } from "vue";
@@ -166,13 +169,13 @@ export default defineComponent({
     Document,
     PicArticle,
     DocumentAnswer,
+    DocumentsmartData,
     DocumentQuestion,
     Analysis,
     DocumentDetail,
     DocumentCombine
   },
   setup() {
-    // nav对应的问答类型,4文库问答,对应的是knowledge类型
     // NOTE: 先把4文库问答的类型改成report类型,后续再改回来
     const dialogType = ["report", "excel", "knowledgeQuiz", "report", "normal", "normal", "normal", "normal"];
     const { config, helper, ajax } = inject("$global");