diff --git a/kcui/src/main.js b/kcui/src/main.js
index da99e79..03f585e 100644
--- a/kcui/src/main.js
+++ b/kcui/src/main.js
@@ -1,16 +1,18 @@
-import Vue from 'vue'
-import App from './App.vue'
+import Vue from 'vue';
+import App from './App.vue';
import VueRouter from 'vue-router';
+import router from './router/router.js';
+import ElementUI from 'element-ui';
+import 'element-ui/lib/theme-chalk/index.css'; // 引入样式
-import router from '../src/router/router.js'
-
-
-Vue.config.productionTip = false
-
+Vue.config.productionTip = false;
// 安装 Vue Router 插件
Vue.use(VueRouter);
+// 安装 Element UI 插件
+Vue.use(ElementUI);
+
new Vue({
router, // 将路由器传递给 Vue 实例
render: h => h(App),
-}).$mount('#app')
+}).$mount('#app');
\ No newline at end of file
diff --git a/kcui/src/view/Book.vue b/kcui/src/view/Book.vue
index f800dd4..b62690f 100644
--- a/kcui/src/view/Book.vue
+++ b/kcui/src/view/Book.vue
@@ -21,6 +21,16 @@
跳转到Calculator
+
+
点击打开弹窗
+
+ 这是一个简单的内容。
+
+
+
@@ -40,6 +50,7 @@ export default {
name: 'Home',
data() {
return{
+ dialogVisible: false,
num:undefined,
infos:[],
demoData:{},
diff --git a/kcui/src/view/Home.vue b/kcui/src/view/Home.vue
index 60a1980..066c79b 100644
--- a/kcui/src/view/Home.vue
+++ b/kcui/src/view/Home.vue
@@ -2,6 +2,12 @@
@@ -76,8 +89,9 @@ export default {
newBranchFileId: '',
newBranchLevel: null,
newBranchParentId: '',
- newBranchRelation:''
-
+ newBranchRelation:'',
+ typeValue: '',
+ keywords: '',
}
},
methods:{
@@ -87,12 +101,34 @@ export default {
onCreated(editor) {
this.editor = Object.seal(editor) // 一定要用 Object.seal() ,否则会报错
},
- getInfo(){
- var data = {}
- getgraphInfo(data).then((res)=>{
- this.zhengl(res.data);
+ // getInfo(){
+ // var data = {}
+ // getgraphInfo(data).then((res)=>{
+ // this.zhengl(res.data);
+ //
+ // })
+ // },
+ getInfo() {
+
+ this.data = undefined;
+ if (this.keywords != '' && this.keywords != undefined) {
+ this.visGraph.clearAll();
+ let params = {
+ nodename: this.keywords,
+ };
+ getgraphInfo(params).then((res) => {
+ this.zhengl(res.data);
+ })
+ } else {
+
+ let params = {};
+
+ getgraphInfo(params).then((res) => {
+ this.zhengl(res.data);
+ })
+ }
+
- })
},
async drawGraphData() {
this.graphData = this.demoData;
@@ -134,7 +170,7 @@ export default {
console.log(node)
this.selectedNode = node;
this.newBranchParentId = node.properties.docId;
-
+ this.newBranchLevel = parseInt(node.properties.level) + 1;
try {
const response = await this.getFileIdByDocId({ docId: node.properties.docId });
@@ -145,7 +181,6 @@ export default {
return;
}
- this.newBranchLevel = parseInt(node.properties.level) + 1;
this.isModalVisible = true; // 显示模态框
},
getFileIdByDocId(data) {
@@ -323,7 +358,7 @@ export default {
},
mounted() {
this.doLogin();
-
+ this.getInfo();
}
}
diff --git a/src/main/java/com/main/woka/Web/Controller/KcInfoController.java b/src/main/java/com/main/woka/Web/Controller/KcInfoController.java
index 453d133..522380c 100644
--- a/src/main/java/com/main/woka/Web/Controller/KcInfoController.java
+++ b/src/main/java/com/main/woka/Web/Controller/KcInfoController.java
@@ -1,7 +1,6 @@
package com.main.woka.Web.Controller;
import com.main.woka.Common.core.AjaxResult;
-import com.main.woka.Web.Dao.GraphQuery;
import com.main.woka.Web.Dao.KcInfo;
import com.main.woka.Web.Mapper.KcFileMapper;
import org.springframework.beans.factory.annotation.Autowired;
@@ -10,8 +9,6 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
-import java.util.List;
-
@RestController
@RequestMapping("/kcDoc")
public class KcInfoController extends BaseController {
@@ -24,24 +21,25 @@ public class KcInfoController extends BaseController {
public AjaxResult getDocList(@RequestBody KcInfo kcInfo) {
- int pageNum = kcInfo.getPageNum() == null ? 1 : kcInfo.getPageNum();
- int pageSize = kcInfo.getPageSize() == null ? 10 : kcInfo.getPageSize();
- int offset = (pageNum - 1) * pageSize;
-
- kcInfo.setOffset(offset);
- Long total = kcFileMapper.getKcCount(kcInfo);
- List list = kcFileMapper.getkcList(kcInfo);
-
- int totalPages = (int) Math.ceil((double) total / pageSize);
-
- AjaxResult ajax = new AjaxResult();
- ajax.put("list",list);
- ajax.put("total",total);
- ajax.put("totalPages",totalPages);
- ajax.put("pageSize",pageSize);
-
-
-
- return AjaxResult.success(ajax);
+// int pageNum = kcInfo.getPageNum() == null ? 1 : kcInfo.getPageNum();
+// int pageSize = kcInfo.getPageSize() == null ? 10 : kcInfo.getPageSize();
+// int offset = (pageNum - 1) * pageSize;
+//
+// kcInfo.setOffset(offset);
+// Long total = kcFileMapper.getKcCount(kcInfo);
+// List list = kcFileMapper.getkcList(kcInfo);
+//
+// int totalPages = (int) Math.ceil((double) total / pageSize);
+//
+// AjaxResult ajax = new AjaxResult();
+// ajax.put("list",list);
+// ajax.put("total",total);
+// ajax.put("totalPages",totalPages);
+// ajax.put("pageSize",pageSize);
+//
+//
+//
+// return AjaxResult.success(ajax);
+ return null;
}
}
diff --git a/src/main/java/com/main/woka/Web/Controller/KcTlFileController.java b/src/main/java/com/main/woka/Web/Controller/KcTlFileController.java
index c81adb0..1cbc390 100644
--- a/src/main/java/com/main/woka/Web/Controller/KcTlFileController.java
+++ b/src/main/java/com/main/woka/Web/Controller/KcTlFileController.java
@@ -1,7 +1,11 @@
package com.main.woka.Web.Controller;
import com.main.woka.Common.core.AjaxResult;
-import com.main.woka.Common.util.*;
+import com.main.woka.Common.util.Neo4jUtil;
+import com.main.woka.Common.util.WebSocket;
+import com.main.woka.Web.Dao.KcInfo;
+import com.main.woka.Web.Dao.KcInfoRelation;
+import com.main.woka.Web.Dao.KcTlFile;
import com.main.woka.Web.Mapper.KcFileMapper;
import com.main.woka.Web.Mapper.KcInfoRelationMapper;
import com.main.woka.Web.Service.impl.KcTlFileServiceImpl;
diff --git a/src/main/java/com/main/woka/Common/util/KcInfo.java b/src/main/java/com/main/woka/Web/Dao/KcInfo.java
similarity index 99%
rename from src/main/java/com/main/woka/Common/util/KcInfo.java
rename to src/main/java/com/main/woka/Web/Dao/KcInfo.java
index f2c63ec..3c0e03b 100644
--- a/src/main/java/com/main/woka/Common/util/KcInfo.java
+++ b/src/main/java/com/main/woka/Web/Dao/KcInfo.java
@@ -1,4 +1,4 @@
-package com.main.woka.Common.util;
+package com.main.woka.Web.Dao;
import java.util.Date;
diff --git a/src/main/java/com/main/woka/Web/Service/impl/WordSplitter.java b/src/main/java/com/main/woka/Web/Service/impl/WordSplitter.java
index 9f40a97..a59d0cb 100644
--- a/src/main/java/com/main/woka/Web/Service/impl/WordSplitter.java
+++ b/src/main/java/com/main/woka/Web/Service/impl/WordSplitter.java
@@ -1004,7 +1004,7 @@ public class WordSplitter {
doc.setName(title);
doc.setLevel(Long.valueOf(level));
doc.setTwUrl(path);
- doc.setFileId(Long.valueOf(String.valueOf(fileId)));
+ doc.setFileId(fileId);
docList.add(doc);