|
@@ -59,7 +59,7 @@
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div> -->
|
|
|
- <a-spin v-show="search_engine == '图谱'" :spinning="loadingChecked" class="flex1 panel flex-col" style="height: 100%;background-color: transparent;">
|
|
|
+ <a-spin v-show="search_engine == '图谱'" :spinning="loadingChecked" class="flex1 panel flex-col" style="height: 500px;background-color: transparent;">
|
|
|
<chart-comp ref="chart"
|
|
|
@="getInfoTooltip"
|
|
|
:isShowContextMenu="true"
|
|
@@ -69,6 +69,15 @@
|
|
|
:enable="true"
|
|
|
:isShowChart="true"></chart-comp>
|
|
|
</a-spin>
|
|
|
+ <span v-show="search_engine == '文档'" :spinning="loadingChecked" class="flex1 panel flex-col" style="height: 500px;background-color: transparent;">
|
|
|
+ <PdfList/>
|
|
|
+ </span>
|
|
|
+ <span v-show="search_engine == '图片'" :spinning="loadingChecked" class="flex1 panel flex-col" style="height: 500px;background-color: transparent;">
|
|
|
+ <ImageList/>
|
|
|
+ </span>
|
|
|
+ <span v-show="search_engine == '媒体'" :spinning="loadingChecked" class="flex1 panel flex-col" style="height: 500px;background-color: transparent;">
|
|
|
+ <VideoList/>
|
|
|
+ </span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -77,14 +86,16 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-// import axios from "axios";
|
|
|
-import storage from "@/utils/storage";
|
|
|
+
|
|
|
import fetchJsonp from "fetch-jsonp";
|
|
|
-// import Graph from "@/components/Echarts/graph";
|
|
|
+
|
|
|
import chartComp from '@/views/knowledge/common/chart'
|
|
|
+import PdfList from '@/views/search/pdf'
|
|
|
+import ImageList from '@/views/search/image'
|
|
|
+import VideoList from '@/views/search/video'
|
|
|
import { getGraphEntClsTree } from '@/api/graph/statisticalMap'
|
|
|
import { getAllEntityClass } from '@/api/graph/entityClass'
|
|
|
- import { getAllRelationClass } from '@/api/graph/relationClass'
|
|
|
+import { getAllRelationClass } from '@/api/graph/relationClass'
|
|
|
const dataList = []
|
|
|
// 根据树生成一个列表
|
|
|
const generateList = (data) => {
|
|
@@ -99,7 +110,7 @@ const dataList = []
|
|
|
}
|
|
|
export default {
|
|
|
name: "Home",
|
|
|
- components: { chartComp },
|
|
|
+ components: { chartComp, PdfList, ImageList, VideoList },
|
|
|
data() {
|
|
|
return {
|
|
|
loadingChecked: false,
|
|
@@ -108,7 +119,7 @@ export default {
|
|
|
relClsList: [], // 关系类列表
|
|
|
allRelClsNameList: [],// 所有的关系类名列表
|
|
|
checkedRelClsNameList: [], // 去重的关系类名列表
|
|
|
- search_engine: "",
|
|
|
+ search_engine: "图谱",
|
|
|
engines: "",
|
|
|
engine_names: "",
|
|
|
keyword: "",
|
|
@@ -118,28 +129,15 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- // 将引擎列表设置为本地存储
|
|
|
- if (storage.get("engines")) {
|
|
|
- this.engines = storage.get("engines");
|
|
|
- this.engine_names = storage.get("engines")["list"];
|
|
|
- if (storage.get("search_engine")) {
|
|
|
- this.set_search_engine(storage.get("search_engine"));
|
|
|
- } else {
|
|
|
- this.set_search_engine(this.engine_names[0]);
|
|
|
- }
|
|
|
- } else {
|
|
|
- let engines = {
|
|
|
- list: ["文档", "图片", "媒体", "图谱"],
|
|
|
- 文档: ["https://www.so.com/s", "q", "word pdf txt", "文档"],
|
|
|
- 图片: ["https://www.baidu.com/s", "wd", "jpg png bmp", "图片"],
|
|
|
- 媒体: ["https://www.google.com/search", "q", "mp3 mp4", "媒体"],
|
|
|
- 图谱: ["https://www.sogou.com/web", "query", "知识图谱", "图谱"],
|
|
|
- };
|
|
|
- storage.set("engines", engines);
|
|
|
- this.engines = engines;
|
|
|
- this.engine_names = storage.get("engines")["list"];
|
|
|
- this.set_search_engine(this.engine_names[0]);
|
|
|
- }
|
|
|
+ let engines = {
|
|
|
+ list: ["文档", "图片", "媒体", "图谱"],
|
|
|
+ 文档: ["https://www.so.com/s", "q", "word pdf txt", "文档"],
|
|
|
+ 图片: ["https://www.baidu.com/s", "wd", "jpg png bmp", "图片"],
|
|
|
+ 媒体: ["https://www.google.com/search", "q", "mp3 mp4", "媒体"],
|
|
|
+ 图谱: ["https://www.sogou.com/web", "query", "知识图谱", "图谱"],
|
|
|
+ };
|
|
|
+ this.engines = engines;
|
|
|
+ this.engine_names = engines["list"];
|
|
|
this.refreshEntityClassList()
|
|
|
/**
|
|
|
* 请求数据,获取所有实体类的信息,然后根据pid组装出实体类之间的关系
|
|
@@ -197,12 +195,11 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
set_search_engine(engine) {
|
|
|
- storage.set("search_engine", engine);
|
|
|
this.search_engine = engine;
|
|
|
this.keyword = ''
|
|
|
},
|
|
|
get_search_engine() {
|
|
|
- return storage.get("search_engine");
|
|
|
+ return this.search_engine;
|
|
|
},
|
|
|
get_hot_keyword() {
|
|
|
if (this.keyword === "") {
|