From 947569acd2564dca9d5d94a6c470386528ccf41f Mon Sep 17 00:00:00 2001
From: linsheng0116 <1401679367@qq.com>
Date: Sat, 25 Jan 2025 04:13:53 +0800
Subject: [PATCH] =?UTF-8?q?2025.1.24=20=E5=BC=B9=E7=AA=97=E5=92=8C?=
=?UTF-8?q?=E6=9F=A5=E8=AF=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
kcui/src/main.js | 18 ++-
kcui/src/view/Book.vue | 11 ++
kcui/src/view/Home.vue | 123 +++++++++-----
.../java/com/main/woka/Common/util/KcInfo.java | 180 ---------------------
.../main/woka/Web/Controller/KcInfoController.java | 42 +++--
.../woka/Web/Controller/KcTlFileController.java | 6 +-
src/main/java/com/main/woka/Web/Dao/KcInfo.java | 180 +++++++++++++++++++++
.../main/woka/Web/Service/impl/WordSplitter.java | 2 +-
8 files changed, 306 insertions(+), 256 deletions(-)
delete mode 100644 src/main/java/com/main/woka/Common/util/KcInfo.java
create mode 100644 src/main/java/com/main/woka/Web/Dao/KcInfo.java
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/Common/util/KcInfo.java b/src/main/java/com/main/woka/Common/util/KcInfo.java
deleted file mode 100644
index f2c63ec..0000000
--- a/src/main/java/com/main/woka/Common/util/KcInfo.java
+++ /dev/null
@@ -1,180 +0,0 @@
-package com.main.woka.Common.util;
-
-import java.util.Date;
-
-public class KcInfo {
- private Long id;
- private Long type;
- private String name;
- private String twUrl;
- private String spUrl;
- private String dwUrl;
- private String jsInfo;
- private Long parentId;
- private Date createTime;
- private Long createBy;
- private Date updateTime;
- private Long updateBy;
- private Long isGraph;
- private Long level;
- private Long groupId;
- private Integer fileId;
- private String twType;
- private String spType;
- private String dwType;
- private String jsType;
- public Integer getFileId() {return fileId;}
-
- public void setFileId(Integer fileId) {this.fileId = fileId;}
-
- public Long getId() {
- return id;
- }
-
- public void setId(Long id) {this.id = id;}
-
- public Long getType() {return type;}
-
- public void setType(Long type) {this.type = type;}
-
- public String getName() {return name;}
-
- public void setName(String name) {this.name = name;}
-
- public String getTwUrl() {return twUrl;}
-
- public void setTwUrl(String twUrl) {this.twUrl = twUrl;}
-
- public String getSpUrl() {return spUrl;}
-
- public void setSpUrl(String spUrl) {this.spUrl = spUrl;}
-
- public String getDwUrl() {return dwUrl;}
-
- public void setDwUrl(String dwUrl) {this.dwUrl = dwUrl;}
-
- public String getJsInfo() {return jsInfo;}
-
- public void setJsInfo(String jsInfo) {this.jsInfo = jsInfo;
- }
- public Long getParentId() {return parentId;}
-
- public void setParentId(Long parentId) {this.parentId = parentId;}
-
- public Long getIsGraph() {return isGraph;
- }
- public void setIsGraph(Long isGraph) {this.isGraph = isGraph;}
-
-
-// @Override
- public Long getCreateBy() {return createBy;}
-
-
- public void setCreateBy(Long createBy) {this.createBy = createBy;}
-
-
- public Long getUpdateBy() {
- return updateBy;
- }
-
-
- public void setUpdateBy(Long updateBy) {
- this.updateBy = updateBy;
- }
-
-
- public Date getCreateTime() {
- return createTime;
- }
-
-
- public void setCreateTime(Date createTime) {
- this.createTime = createTime;
- }
-
-
- public Date getUpdateTime() {
- return updateTime;
- }
-
-
- public void setUpdateTime(Date updateTime) {
- this.updateTime = updateTime;
- }
-
-
-
- public Long getLevel() {
- return level;
- }
-
- public void setLevel(Long level) {
- this.level = level;
- }
-
- public Long getGroupId() {
- return groupId;
- }
-
- public void setGroupId(Long groupId) {
- this.groupId = groupId;
- }
-
- public String getTwType() {
- return twType;
- }
-
- public void setTwType(String twType) {
- this.twType = twType;
- }
-
- public String getSpType() {
- return spType;
- }
-
- public void setSpType(String spType) {
- this.spType = spType;
- }
-
- public String getDwType() {
- return dwType;
- }
-
- public void setDwType(String dwType) {
- this.dwType = dwType;
- }
-
- public String getJsType() {
- return jsType;
- }
-
- public void setJsType(String jsType) {
- this.jsType = jsType;
- }
-
- @Override
- public String toString() {
- return "KcInfo{" +
- "id=" + id +
- ", type=" + type +
- ", name='" + name + '\'' +
- ", twUrl='" + twUrl + '\'' +
- ", spUrl='" + spUrl + '\'' +
- ", dwUrl='" + dwUrl + '\'' +
- ", jsInfo='" + jsInfo + '\'' +
- ", parentId=" + parentId +
- ", createTime=" + createTime +
- ", createBy=" + createBy +
- ", updateTime=" + updateTime +
- ", updateBy=" + updateBy +
- ", isGraph=" + isGraph +
- ", level=" + level +
- ", groupId=" + groupId +
- ", fileId=" + fileId +
- ", twType='" + twType + '\'' +
- ", spType='" + spType + '\'' +
- ", dwType='" + dwType + '\'' +
- ", jsType='" + jsType + '\'' +
- '}';
- }
-}
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/Web/Dao/KcInfo.java b/src/main/java/com/main/woka/Web/Dao/KcInfo.java
new file mode 100644
index 0000000..3c0e03b
--- /dev/null
+++ b/src/main/java/com/main/woka/Web/Dao/KcInfo.java
@@ -0,0 +1,180 @@
+package com.main.woka.Web.Dao;
+
+import java.util.Date;
+
+public class KcInfo {
+ private Long id;
+ private Long type;
+ private String name;
+ private String twUrl;
+ private String spUrl;
+ private String dwUrl;
+ private String jsInfo;
+ private Long parentId;
+ private Date createTime;
+ private Long createBy;
+ private Date updateTime;
+ private Long updateBy;
+ private Long isGraph;
+ private Long level;
+ private Long groupId;
+ private Integer fileId;
+ private String twType;
+ private String spType;
+ private String dwType;
+ private String jsType;
+ public Integer getFileId() {return fileId;}
+
+ public void setFileId(Integer fileId) {this.fileId = fileId;}
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {this.id = id;}
+
+ public Long getType() {return type;}
+
+ public void setType(Long type) {this.type = type;}
+
+ public String getName() {return name;}
+
+ public void setName(String name) {this.name = name;}
+
+ public String getTwUrl() {return twUrl;}
+
+ public void setTwUrl(String twUrl) {this.twUrl = twUrl;}
+
+ public String getSpUrl() {return spUrl;}
+
+ public void setSpUrl(String spUrl) {this.spUrl = spUrl;}
+
+ public String getDwUrl() {return dwUrl;}
+
+ public void setDwUrl(String dwUrl) {this.dwUrl = dwUrl;}
+
+ public String getJsInfo() {return jsInfo;}
+
+ public void setJsInfo(String jsInfo) {this.jsInfo = jsInfo;
+ }
+ public Long getParentId() {return parentId;}
+
+ public void setParentId(Long parentId) {this.parentId = parentId;}
+
+ public Long getIsGraph() {return isGraph;
+ }
+ public void setIsGraph(Long isGraph) {this.isGraph = isGraph;}
+
+
+// @Override
+ public Long getCreateBy() {return createBy;}
+
+
+ public void setCreateBy(Long createBy) {this.createBy = createBy;}
+
+
+ public Long getUpdateBy() {
+ return updateBy;
+ }
+
+
+ public void setUpdateBy(Long updateBy) {
+ this.updateBy = updateBy;
+ }
+
+
+ public Date getCreateTime() {
+ return createTime;
+ }
+
+
+ public void setCreateTime(Date createTime) {
+ this.createTime = createTime;
+ }
+
+
+ public Date getUpdateTime() {
+ return updateTime;
+ }
+
+
+ public void setUpdateTime(Date updateTime) {
+ this.updateTime = updateTime;
+ }
+
+
+
+ public Long getLevel() {
+ return level;
+ }
+
+ public void setLevel(Long level) {
+ this.level = level;
+ }
+
+ public Long getGroupId() {
+ return groupId;
+ }
+
+ public void setGroupId(Long groupId) {
+ this.groupId = groupId;
+ }
+
+ public String getTwType() {
+ return twType;
+ }
+
+ public void setTwType(String twType) {
+ this.twType = twType;
+ }
+
+ public String getSpType() {
+ return spType;
+ }
+
+ public void setSpType(String spType) {
+ this.spType = spType;
+ }
+
+ public String getDwType() {
+ return dwType;
+ }
+
+ public void setDwType(String dwType) {
+ this.dwType = dwType;
+ }
+
+ public String getJsType() {
+ return jsType;
+ }
+
+ public void setJsType(String jsType) {
+ this.jsType = jsType;
+ }
+
+ @Override
+ public String toString() {
+ return "KcInfo{" +
+ "id=" + id +
+ ", type=" + type +
+ ", name='" + name + '\'' +
+ ", twUrl='" + twUrl + '\'' +
+ ", spUrl='" + spUrl + '\'' +
+ ", dwUrl='" + dwUrl + '\'' +
+ ", jsInfo='" + jsInfo + '\'' +
+ ", parentId=" + parentId +
+ ", createTime=" + createTime +
+ ", createBy=" + createBy +
+ ", updateTime=" + updateTime +
+ ", updateBy=" + updateBy +
+ ", isGraph=" + isGraph +
+ ", level=" + level +
+ ", groupId=" + groupId +
+ ", fileId=" + fileId +
+ ", twType='" + twType + '\'' +
+ ", spType='" + spType + '\'' +
+ ", dwType='" + dwType + '\'' +
+ ", jsType='" + jsType + '\'' +
+ '}';
+ }
+}
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);