diff --git a/kcui/src/assets/img/graphDown.png b/kcui/src/assets/img/graphDown.png new file mode 100644 index 0000000..e9b62a2 Binary files /dev/null and b/kcui/src/assets/img/graphDown.png differ diff --git a/kcui/src/assets/img/graphInput.png b/kcui/src/assets/img/graphInput.png new file mode 100644 index 0000000..ddbca71 Binary files /dev/null and b/kcui/src/assets/img/graphInput.png differ diff --git a/kcui/src/assets/img/graphUp.png b/kcui/src/assets/img/graphUp.png new file mode 100644 index 0000000..0dacf6b Binary files /dev/null and b/kcui/src/assets/img/graphUp.png differ diff --git a/kcui/src/assets/img/graphbg.png b/kcui/src/assets/img/graphbg.png index 791250f..c87722c 100644 Binary files a/kcui/src/assets/img/graphbg.png and b/kcui/src/assets/img/graphbg.png differ diff --git a/kcui/src/assets/img/juxing.png b/kcui/src/assets/img/juxing.png new file mode 100644 index 0000000..e7fdd4f Binary files /dev/null and b/kcui/src/assets/img/juxing.png differ diff --git a/kcui/src/view/Graph.vue b/kcui/src/view/Graph.vue index 0090eaf..435b225 100644 --- a/kcui/src/view/Graph.vue +++ b/kcui/src/view/Graph.vue @@ -17,8 +17,7 @@
{{ item.name }}
- +
-
- -
-
-
关键字:
- - -
- 查询 +
+
+
+
+ +
关键词: +
-
- 导入 +
+ +
+ +
+
+
+
+
+
+
+ +
+ 飞机类型: +
-
-
飞机类型:
- - + +
+ + +
+
+
+
+
+
+ +
+ 飞行任务: +
+
+ + +
+ + +
+
+
+
+
+
+ +
+ 飞行载荷: +
+
+ + +
+ +
-
-
+
+ + + + + + + + + + + + +
+
+
@@ -124,7 +185,7 @@ 新增下级 修改 - 删除 + 删除 @@ -154,9 +215,26 @@ - + + + + + + + + + + + +
@@ -333,6 +415,7 @@ import {config} from '@/assets/defaultConfig.js' import {addFile, addNode, getFileIdByDocId} from "@/api/file"; import Editor from "@/components/Editor.vue"; import {getToken} from "@/utils/auth"; +import {twdelete} from "@/api/twdelete"; export default { // eslint-disable-next-line vue/multi-word-component-names @@ -340,6 +423,10 @@ export default { components: {Editor, Foot, headInfo}, data() { return { + typePic1: 0, + typePic2: 0, + typePic3: 0, + userName: "", userType: 0, mulu: [ @@ -385,58 +472,40 @@ export default { options1: [{ - value: '选项1', - label: '黄金糕' + value: '1', + label: '直9' }, { - value: '选项2', - label: '双皮奶' + value: '2', + label: '直9-c' }, { - value: '选项3', - label: '蚵仔煎' - }, { - value: '选项4', - label: '龙须面' - }, { - value: '选项5', - label: '北京烤鸭' + value: '3', + label: '卡式机' }], value1: '', options2: [{ - value: '选项1', - label: '黄金糕' - }, { - value: '选项2', - label: '双皮奶' - }, { - value: '选项3', - label: '蚵仔煎' + value: '0', + label: '起飞' }, { - value: '选项4', - label: '龙须面' + value: '1', + label: '降落' }, { - value: '选项5', - label: '北京烤鸭' + value: '2', + label: '飞行' }], value2: '', options3: [{ - value: '选项1', - label: '黄金糕' + value: '0', + label: '鱼雷' }, { - value: '选项2', - label: '双皮奶' + value: '1', + label: '导弹' }, { - value: '选项3', - label: '蚵仔煎' - }, { - value: '选项4', - label: '龙须面' - }, { - value: '选项5', - label: '北京烤鸭' + value: '2', + label: '侦察' }], value3: '', @@ -475,6 +544,32 @@ export default { }, methods: { + changeType1() { + if (this.typePic1 == 0) { + this.typePic1 = 1; + } else { + this.typePic1 = 0 + } + }, + changeType2() { + if (this.typePic2 == 0) { + this.typePic2 = 1; + } else { + this.typePic2 = 0 + } + }, + changeType3() { + if (this.typePic3 == 0) { + this.typePic3 = 1; + } else { + this.typePic3 = 0 + } + }, + //图谱 查询 + selectGraph() { + console.log("jksajdklaj-----走这里") + }, + openFileInput() { // 触发隐藏的文件输入框点击事件 this.$refs.fileInput.click(); @@ -563,7 +658,18 @@ export default { //管理员操作 deleteTw() { - console.log("这是删除操作") + var id = this.nodeInfo.docId; + twdelete(id).then((res) => { + console.log(res); + if (res.code == 500) { + this.$message.error(res.msg); + } + if (res.code == 200) { + this.$message.success("删除成功"); + this.isModalVisible = false; + this.getInfo(); + } + }) }, editTw(id) { //展示出一个修改的弹窗 @@ -614,6 +720,7 @@ export default { this.zhengl(res.data); }) } else { + this.visGraph.clearAll(); let params = {}; getgraphInfo(params).then((res) => { @@ -889,6 +996,28 @@ export default { const relation = this.newBranchRelation.trim(); if (this.selectedNode && content && value) { + + var urlStr = ""; + + for (let f = 0; f < this.fileList.length; f++) { + if (f == 0) { + if (this.fileList[f].response != null) { + urlStr = this.fileList[f].response.data.url + } else { + urlStr = this.fileList[f].url + } + + } else { + if (this.fileList[f].response != null) { + urlStr = urlStr + "," + this.fileList[f].response.data.url + } else { + urlStr = urlStr + "," + this.fileList[f].url + } + + } + } + + // 构造数据 const data = { fileId: fileId, @@ -897,7 +1026,8 @@ export default { relation: relation, parentId: this.newBranchParentId, level: this.newBranchLevel, - nodeType: 'tw' + nodeType: 'tw', + imgs: urlStr }; try { @@ -1081,8 +1211,8 @@ export default { {size: 300, width: 300, height: 300, color: '0,246,255', font: 'normal 50px Arial', fontColor: '0,0,0'}, {size: 250, width: 250, height: 250, color: '0,198,255', font: 'normal 40px Arial', fontColor: '0,0,0'}, {size: 200, width: 200, height: 200, color: '42,152,255', font: 'normal 32px Arial', fontColor: '255,255,255'}, - {size: 150, width: 150, height: 150, color: '0,198,255', font: 'normal 30px Arial', fontColor: '0,0,0'}, - {size: 130, width: 130, height: 130, color: '198,186,242', font: 'normal 28px Arial', fontColor: '0,0,0',strokeStyle:'198,186,242'} + {size: 150, width: 150, height: 150, color: '0,95,183', font: 'normal 30px Arial', fontColor: '0,0,0'}, + {size: 130, width: 130, height: 130, color: '0,62,164', font: 'normal 28px Arial', fontColor: '255,255,255'} ]; return styles[group] || {}; @@ -1275,7 +1405,7 @@ export default { .rightList { - width: 94.6%; + width: 96%; height: 88%; position: absolute; z-index: 2; @@ -1298,11 +1428,10 @@ export default { .tupu { width: 100%; - height: 100%; + height: 90%; position: absolute; z-index: 3; - top: 1%; - + top: 7.5%; } .gContainer { @@ -1313,7 +1442,7 @@ export default { justify-content: center; overflow: hidden; width: 100%; - height: 37vw; + height: 39vw; border-radius: 2vw; } @@ -1345,4 +1474,74 @@ export default { .custom-dialog { margin-top: 0vh !important; } + + +.graphcontains1 { + width: 60%; + height: 2vw; + position: relative; + display: flex; + flex-direction: row; + justify-content: flex-start; + margin-left: 5%; + +} + +.graphcontains2 { + width: 60%; + height: 2vw; + position: relative; + display: flex +; + flex-direction: row; + justify-content: flex-start; + margin-left: 3%; + +} + +input { + width: 100%; + height: 100%; + border: none; + outline: none; + color: white; /* 文字颜色 */ + background-color: transparent; + padding-left: 3%; + position: absolute; + z-index: 2000; + +} + +input::placeholder { + color: rgba(255, 255, 255, 0.54); + opacity: 1; /* Firefox 默认将 placeholder 的透明度设置为 0.54 */ + +} + + +select { + //background-image: url("../assets/img/zcType.png"); + width: 100%; + height: 100%; + border: none; + outline: none; + color: white; /* 文字颜色 */ + background-color: transparent; + padding-left: 3%; + position: absolute; + z-index: 2000; + appearance: none; +} + +option { + color: black; + background: rgb(255, 255, 255); + line-height: 20px; +} + +option:hover { + background: #EBCCD1; +} + + diff --git a/kcui/src/view/JsInfo.vue b/kcui/src/view/JsInfo.vue index 85ef7ac..80b7a58 100644 --- a/kcui/src/view/JsInfo.vue +++ b/kcui/src/view/JsInfo.vue @@ -113,7 +113,7 @@
修改
-
删除
+
@@ -309,10 +309,6 @@ export default { }, - //管理员操作 - deleteTw() { - console.log("这是删除操作") - }, editTw(id) { //展示出一个修改的弹窗 var data = { diff --git a/kcui/src/view/Login.vue b/kcui/src/view/Login.vue index 5281143..6b6ef60 100644 --- a/kcui/src/view/Login.vue +++ b/kcui/src/view/Login.vue @@ -215,7 +215,7 @@ export default { } }, mounted() { - this.login(); + // this.login(); } } diff --git a/kcui/src/view/TWInfo.vue b/kcui/src/view/TWInfo.vue index f29bd93..71bc552 100644 --- a/kcui/src/view/TWInfo.vue +++ b/kcui/src/view/TWInfo.vue @@ -555,13 +555,14 @@ export default { position: absolute; z-index: 2; top: 1%; + padding-top: 1vw; } .oneRight { width: 98%; height: 4.6vw; - line-height: 5vw; + line-height: 1.3vw; //background-color: #42b983; margin: 0 1%; display: flex; 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 7726d5f..804b074 100644 --- a/src/main/java/com/main/woka/Web/Controller/KcInfoController.java +++ b/src/main/java/com/main/woka/Web/Controller/KcInfoController.java @@ -167,6 +167,9 @@ public class KcInfoController extends BaseController { KcInfoRelation r = new KcInfoRelation(); r.setSourceId(aa.getParentId()); + if(aa.getParentId()==0){ + r.setSourceId(Long.valueOf(String.valueOf(aa.getFileId()))); + } r.setTargetId(aa.getId()); String relation = kcInfoRelationMapper.selectKcRelationshipList(r).get(0).getRelation(); aa.setRelation(relation); @@ -678,7 +681,7 @@ public class KcInfoController extends BaseController { } - //图文 + //视频 if (kcInfo.getType() == 2) { System.out.println("jjjjj===="); System.out.println(kcInfo.getSpUrl()); 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 bd15a5b..1f71859 100644 --- a/src/main/java/com/main/woka/Web/Controller/KcTlFileController.java +++ b/src/main/java/com/main/woka/Web/Controller/KcTlFileController.java @@ -6,8 +6,10 @@ 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.Dao.KcTwImg; import com.main.woka.Web.Mapper.KcFileMapper; import com.main.woka.Web.Mapper.KcInfoRelationMapper; +import com.main.woka.Web.Mapper.TwImgMapper; import com.main.woka.Web.Service.impl.KcTlFileServiceImpl; import com.main.woka.Web.Service.impl.PdfUtil; import org.neo4j.driver.v1.StatementResult; @@ -49,6 +51,10 @@ public class KcTlFileController extends BaseController { @Autowired KcInfoRelationMapper kcInfoRelationMapper; + + @Autowired + TwImgMapper twImgMapper; + @PostMapping("/addFile") public AjaxResult addFile(MultipartFile file) throws IOException { String url = saveFileWithStructure(file); @@ -125,7 +131,11 @@ public class KcTlFileController extends BaseController { System.out.println(requestBody); String nodeType = requestBody.get("nodeType"); if(nodeType.equals("tw")){ - Integer fileId = Integer.valueOf(requestBody.get("fileId")); + Integer fileId = Integer.valueOf(String.valueOf(kcFileMapper.getFileList().get(0).getId())); + if(requestBody.get("fileId")!=null && !requestBody.get("fileId").equals("null")){ + fileId = Integer.valueOf(requestBody.get("fileId")); + } + String txtName = requestBody.get("txtName"); String TxtValue = requestBody.get("TxtValue"); String relation = requestBody.get("relation"); @@ -137,6 +147,12 @@ public class KcTlFileController extends BaseController { String pathPart = url.substring(0, lastBackslashIndex + 1); String result = pathPart + "wordSplitter"; String txtUrl = createTxtFile(result, txtName, TxtValue); + String imgs = ""; + + + + + @@ -153,6 +169,32 @@ public class KcTlFileController extends BaseController { kcFileMapper.insertDoc(kcInfo); + if(requestBody.get("imgs")!=null && !requestBody.get("imgs").equals("null")){ + imgs = requestBody.get("imgs"); + String[] imgList = imgs.split(","); + List list = new ArrayList<>(); + if (imgList.length != 0) { + for (int a = 0; a < imgList.length; a++) { + KcTwImg twimg = new KcTwImg(); + twimg.setTwId(kcInfo.getId()); + twimg.setImgUrl(imgList[a]); + list.add(twimg); + } + } else { + if(!imgs.equals("")){ + KcTwImg twimg = new KcTwImg(); + twimg.setTwId(kcInfo.getId()); + twimg.setImgUrl(imgs); + list.add(twimg); + } + + } + + + twImgMapper.insertTwImg(list); + } + + //创建图谱 diff --git a/src/main/java/com/main/woka/Web/Controller/TwDeleteController.java b/src/main/java/com/main/woka/Web/Controller/TwDeleteController.java index 058abb6..0fe136c 100644 --- a/src/main/java/com/main/woka/Web/Controller/TwDeleteController.java +++ b/src/main/java/com/main/woka/Web/Controller/TwDeleteController.java @@ -1,29 +1,78 @@ package com.main.woka.Web.Controller; import com.main.woka.Common.core.AjaxResult; -import com.main.woka.Web.Service.TwDeleteService; +import com.main.woka.Common.util.Neo4jUtil; +import com.main.woka.Web.Dao.KcInfoRelation; +import com.main.woka.Web.Mapper.KcInfoRelationMapper; +import com.main.woka.Web.Mapper.TwDeleteMapper; +import org.neo4j.driver.v1.StatementResult; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import java.util.List; + @RestController @RequestMapping("/twdelete") public class TwDeleteController extends BaseController { @Autowired - private TwDeleteService twDeleteService; + private TwDeleteMapper twDeleteMapper; + + + @Autowired + private KcInfoRelationMapper kcInfoRelationMapper; + + @Autowired + Neo4jUtil neo4jUtil; + + + + @DeleteMapping("/{id}") public AjaxResult deleteItem(@PathVariable Long id) { try { - // 调用服务层方法进行删除操作 - twDeleteService.deleteItem(id); - return AjaxResult.success(); + KcInfoRelation rr = new KcInfoRelation(); + rr.setSourceId(id); + + List list = kcInfoRelationMapper.selectKcRelationshipList(rr); + if(list.size()>0){ + return AjaxResult.error("节点拥有子节点不可删除"); + }else { + // 调用服务层方法进行删除操作 + int a = twDeleteMapper.deleteById(id); + + //删除对应关系 + KcInfoRelation kr = new KcInfoRelation(); + kr.setTargetId(id); + List rl = kcInfoRelationMapper.selectKcRelationshipList(kr); + for(int i=0;i