Browse Source

导入文件夹

small-tupu
hanyuqing 6 months ago
parent
commit
36ba5e8347
  1. 174
      gyxtp/src/view/docInfo.vue
  2. 8
      gyxtp/src/view/graphPageCopy0926.vue
  3. 1561
      gyxtp/src/view/graphPageNB927.vue
  4. 8
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/WordSplitter.java
  5. 12
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ZhyFileManageServiceImpl.java
  6. 30
      ruoyi-ui/src/views/system/SysPoint/index.vue

174
gyxtp/src/view/docInfo.vue

@ -51,11 +51,11 @@
</div>
<div class="leftDoc">
<div v-if="chooseInfo==1" class="titleInfo">
<div class="oneTitle" style="background-color: #e4e4e4;">
<div class="oneTitle" style="background-color: #e4e4e4;cursor: pointer">
<div class="chengBlock"></div>
<div class="chengTitle">知识内容</div>
</div>
<div class="oneTitle" @click="haveGraph()">
<div class="oneTitle" @click="haveGraph()" style="cursor: pointer">
<div class="huiBlock"></div>
<div class="huiTitle">关系图谱</div>
</div>
@ -63,7 +63,7 @@
<!-- <div class="huiBlock"></div>-->
<!-- <div class="huiTitle">学习资源</div>-->
<!-- </div>-->
<div class="oneTitle" @click="chooseInfo=2">
<div class="oneTitle" @click="chooseInfo=2" style="cursor: pointer">
<div class="huiBlock"></div>
<div class="huiTitle">图片视频</div>
</div>
@ -71,11 +71,11 @@
</div>
<div v-if="chooseInfo==2" class="titleInfo">
<div class="oneTitle" @click="chooseInfo=1">
<div class="oneTitle" @click="chooseInfo=1" style="cursor: pointer">
<div class="huiBlock"></div>
<div class="huiTitle">知识内容</div>
</div>
<div class="oneTitle" @click="haveGraph()">
<div class="oneTitle" @click="haveGraph()" style="cursor: pointer">
<div class="huiBlock"></div>
<div class="huiTitle">关系图谱</div>
</div>
@ -83,20 +83,20 @@
<!-- <div class="huiBlock"></div>-->
<!-- <div class="huiTitle">学习资源</div>-->
<!-- </div>-->
<div class="oneTitle" style="background-color: #e4e4e4;">
<div class="oneTitle" style="background-color: #e4e4e4;cursor: pointer">
<div class="chengBlock"></div>
<div class="chengTitle">图片视频</div>
</div>
</div>
<div v-if="chooseInfo==3" class="titleInfo">
<div class="oneTitle" @click="chooseInfo=1">
<div v-if="chooseInfo==3" class="titleInfo" >
<div class="oneTitle" @click="chooseInfo=1" style="cursor: pointer">
<div class="huiBlock"></div>
<div class="huiTitle">知识内容</div>
</div>
<div class="oneTitle" style="background-color: #e4e4e4;">
<div class="oneTitle" style="background-color: #e4e4e4;cursor: pointer">
<div class="chengBlock"></div>
<div class="chengTitle">关系图谱</div>
</div>
@ -104,20 +104,20 @@
<!-- <div class="huiBlock"></div>-->
<!-- <div class="huiTitle">学习资源</div>-->
<!-- </div>-->
<div class="oneTitle" @click="chooseInfo=2">
<div class="oneTitle" @click="chooseInfo=2" style="cursor: pointer">
<div class="huiBlock"></div>
<div class="huiTitle">图片视频</div>
</div>
</div>
<div v-if="chooseInfo==5" class="titleInfo">
<div class="oneTitle" @click="chooseInfo=1">
<div v-if="chooseInfo==5" class="titleInfo" >
<div class="oneTitle" @click="chooseInfo=1" style="cursor: pointer">
<div class="huiBlock"></div>
<div class="huiTitle">知识内容</div>
</div>
<div class="oneTitle" @click="haveGraph()">
<div class="oneTitle" @click="haveGraph()" style="cursor: pointer">
<div class="huiBlock"></div>
<div class="huiTitle">关系图谱</div>
</div>
@ -125,7 +125,7 @@
<!-- <div class="chengBlock"></div>-->
<!-- <div class="chengTitle">学习资源</div>-->
<!-- </div>-->
<div class="oneTitle" @click="chooseInfo=2">
<div class="oneTitle" @click="chooseInfo=2" style="cursor: pointer">
<div class="huiBlock"></div>
<div class="huiTitle">图片视频</div>
</div>
@ -233,67 +233,71 @@
<!-- @mouseenter="showNodeTips(node)" @mouseout="overMouse"-->
<template #node="{node}">
<div class="my-node-1" >
<div v-if="node.data.label==0"
style="line-height: 70px;font-size: 60px;margin-top: 10px;">
{{ node.text }}
</div>
<div v-if="node.data.label==1 && node.text.length>7"
style="line-height: 70px;font-size: 55px;margin-top: 15%;">
{{ node.text }}
</div>
<div v-if="node.data.label==1 && node.text.length<=7"
style="line-height: 70px;font-size: 55px;margin-top: 20%;">
{{ node.text }}
</div>
<div v-if="node.data.label==2 && node.text.length>7"
style="line-height: 70px;font-size: 50px;margin-top: 15%;">
{{ node.text }}
</div>
<div v-if="node.data.label==2 && node.text.length<=7"
style="line-height: 70px;font-size: 50px;margin-top: 20%;">
{{ node.text }}
</div>
<div v-if="node.data.label==3 && node.text.length>7"
style="line-height: 40px;font-size: 40px;margin-top: 15%;">
{{ node.text }}
</div>
<div v-if="node.data.label==3 && node.text.length<=7"
style="line-height: 40px;font-size: 40px;margin-top: 30%;">
{{ node.text }}
</div>
<div v-if="node.data.label==4 && node.text.length>7"
style="line-height: 40px;font-size: 35px;margin-top: 14%;">
{{ node.text }}
</div>
<div v-if="node.data.label==4 && node.text.length<=7"
style="line-height: 40px;font-size: 35px;margin-top: 30%;">
{{ node.text }}
</div>
<div v-if="node.data.label==5 && node.text.length>7"
style="line-height: 30px;font-size: 30px;margin-top: 15%;">
{{ node.text }}
</div>
<div v-if="node.data.label==5 && node.text.length<=7"
style="line-height: 30px;font-size: 30px;margin-top: 30%;">
{{ node.text }}
</div>
<div v-if="node.data.label==6 && node.text.length>7"
style="line-height: 25px;font-size: 25px;margin-top: 15%;">
{{ node.text }}
</div>
<div v-if="node.data.label==6 && node.text.length<=7"
style="line-height: 25px;font-size: 25px;margin-top: 30%;">
<div
style="color:#fff; width: 80%; position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);font-size: 30px">
{{ node.text }}
</div>
<!-- <div v-if="node.data.label==0"-->
<!-- style="width: 80%; position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);font-size: 30px">-->
<!-- {{ node.text }}-->
<!-- </div>-->
<!-- <div v-if="node.data.label==1 && node.text.length>7"-->
<!-- style="width: 80%; position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);font-size: 30px">-->
<!-- {{ node.text }}-->
<!-- </div>-->
<!-- <div v-if="node.data.label==1 && node.text.length<=7"-->
<!-- style="line-height: 70px;font-size: 55px;margin-top: 20%;">-->
<!-- {{ node.text }}-->
<!-- </div>-->
<!-- <div v-if="node.data.label==2 && node.text.length>7"-->
<!-- style="line-height: 70px;font-size: 50px;margin-top: 15%;">-->
<!-- {{ node.text }}-->
<!-- </div>-->
<!-- <div v-if="node.data.label==2 && node.text.length<=7"-->
<!-- style="line-height: 70px;font-size: 50px;margin-top: 20%;">-->
<!-- {{ node.text }}-->
<!-- </div>-->
<!-- <div v-if="node.data.label==3 && node.text.length>7"-->
<!-- style="line-height: 40px;font-size: 40px;margin-top: 15%;">-->
<!-- {{ node.text }}-->
<!-- </div>-->
<!-- <div v-if="node.data.label==3 && node.text.length<=7"-->
<!-- style="line-height: 40px;font-size: 40px;margin-top: 30%;">-->
<!-- {{ node.text }}-->
<!-- </div>-->
<!-- <div v-if="node.data.label==4 && node.text.length>7"-->
<!-- style="line-height: 40px;font-size: 35px;margin-top: 14%;">-->
<!-- {{ node.text }}-->
<!-- </div>-->
<!-- <div v-if="node.data.label==4 && node.text.length<=7"-->
<!-- style="line-height: 40px;font-size: 35px;margin-top: 30%;">-->
<!-- {{ node.text }}-->
<!-- </div>-->
<!-- <div v-if="node.data.label==5 && node.text.length>7"-->
<!-- style="line-height: 30px;font-size: 30px;margin-top: 15%;">-->
<!-- {{ node.text }}-->
<!-- </div>-->
<!-- <div v-if="node.data.label==5 && node.text.length<=7"-->
<!-- style="line-height: 30px;font-size: 30px;margin-top: 30%;">-->
<!-- {{ node.text }}-->
<!-- </div>-->
<!-- <div v-if="node.data.label==6 && node.text.length>7"-->
<!-- style="line-height: 25px;font-size: 25px;margin-top: 15%;">-->
<!-- {{ node.text }}-->
<!-- </div>-->
<!-- <div v-if="node.data.label==6 && node.text.length<=7"-->
<!-- style="line-height: 25px;font-size: 25px;margin-top: 30%;">-->
<!-- {{ node.text }}-->
<!-- </div>-->
</div>
</template>
</RelationGraph>
@ -654,8 +658,9 @@ export default {
},
onNodeClick(nodeObject, $event) {
var url = localStorage.getItem("docUrl");
var url = localStorage.getItem("docUrl");
console.log(url)
localStorage.setItem("oldDocUrl", url)
localStorage.setItem("oldLevel", this.$route.query.level);
localStorage.setItem("olddocId", this.$route.query.docId)
@ -664,7 +669,12 @@ export default {
'id': nodeObject.data.docId,
'docTitle': nodeObject.text,
}
if (data.docTitle=="联合作战气象海洋影响评估与决策支撑体系"){
return
}
getDocInfo(data).then((res) => {
localStorage.setItem("docUrl", res.data.docUrl);
this.$router.replace({
query: {
@ -929,7 +939,7 @@ export default {
},
width: 320,
height: 320,
color: '#1955ff',
color: '#ffd602',
fontColor: '#000000',
className: 'testNode'
})
@ -946,7 +956,7 @@ export default {
docId: nodeList[a].docId,
width: 300,
height: 300,
color: '#ffd119'
color: 'rgb(64, 158, 255)'
})
}
if (nodeList[a].docLeve == "leve2") {
@ -961,7 +971,7 @@ export default {
docId: nodeList[a].docId,
width: 260,
height: 260,
color: '#9b72a6'
color: '#ff8c00'
})
}
if (nodeList[a].docLeve == "leve3") {
@ -976,7 +986,7 @@ export default {
docId: nodeList[a].docId,
width: 220,
height: 220,
color: '#b7f49e'
color:'#67c23a'
})
}
if (nodeList[a].docLeve == "leve4") {
@ -991,7 +1001,7 @@ export default {
docId: nodeList[a].docId,
width: 180,
height: 180,
color: 'rgba(255,156,41,0.96)'
color: 'rgb(248,143,248)'
})
}
if (nodeList[a].docLeve == "leve5") {
@ -1006,7 +1016,7 @@ export default {
docId: nodeList[a].docId,
width: 140,
height: 140,
color: 'rgba(30,255,0,0.73)'
color: 'rgb(65,154,255)'
})
}
if (nodeList[a].docLeve == "leve6") {
@ -1021,7 +1031,7 @@ export default {
docId: nodeList[a].docId,
width: 110,
height: 110,
color: '#00e4ff'
color: 'rgb(0,228,255)'
})
}
@ -1033,7 +1043,7 @@ export default {
from: lineList[b].sourceid,
to: lineList[b].targetid,
text: lineList[b].name,
color: '#000000',
color: '#fff',
uuid: lineList[b].uuid,
lineWidth: 2
})

8
gyxtp/src/view/graphPageCopy0926.vue

@ -349,9 +349,8 @@ export default {
defaultNodeShape: 0,
defaultNodeWidth: 40,
defaultNodeHeight: 40,
toolBarDirection: 'h',
toolBarPositionH: 'center',
toolBarPositionV: 'bottom',
toolBarDirection: 'v',
toolBarPositionH: 'right',
defaultLineShape: 1,
defaultJunctionPoint: 'border',
// lineUseTextPath: true,
@ -462,6 +461,9 @@ export default {
'id': nodeObject.data.docId,
'docTitle': nodeObject.text,
}
if (data.docTitle=="联合作战气象海洋影响评估与决策支撑体系"){
return
}
getDocInfo(data).then((res) => {
localStorage.setItem("docUrl", res.data.docUrl)
this.$router.push({

1561
gyxtp/src/view/graphPageNB927.vue

File diff suppressed because it is too large

8
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/WordSplitter.java

@ -2268,7 +2268,7 @@ public class WordSplitter {
zz.setDocLevel(1l);
ZhyDoc zhy = test1Mapper.selectDoc(zz);
zhy.setDocParentId(0l);
zhy.setGroupId(Long.valueOf(i));
zhy.setGroupId(0l);
updateList.add(zhy);
@ -2287,7 +2287,7 @@ public class WordSplitter {
aa.setDocUrl(String.valueOf(ll.get(a).get("docUrl")));
aa.setDocParentId(TopId);
aa.setCreateTime(new Date());
aa.setGroupId(Long.valueOf(i));
aa.setGroupId(0l);
updateList.add(aa);
} else {
int aaaaa = 0;
@ -2318,7 +2318,7 @@ public class WordSplitter {
newDoc.setCreateTime(new Date());
newDoc.setDocParentId(zhy1.getId());
System.out.println(newDoc);
newDoc.setGroupId(Long.valueOf(i));
newDoc.setGroupId(0l);
updateList.add(newDoc);
aaaaa = 1;
break;
@ -2334,7 +2334,7 @@ public class WordSplitter {
aa.setDocUrl(String.valueOf(ll.get(a).get("docUrl")));
aa.setDocParentId(TopId);
aa.setCreateTime(new Date());
aa.setGroupId(Long.valueOf(i));
aa.setGroupId(0l);
System.out.println(aa);
updateList.add(aa);
}

12
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ZhyFileManageServiceImpl.java

@ -136,7 +136,7 @@ public class ZhyFileManageServiceImpl {
String name1 = name;
String name2 = source;
ZhyDocRelation zz1 = new ZhyDocRelation();
zz1.setRelationship("属于");
zz1.setRelationship("包含");
zz1.setSource(Long.valueOf(fileId));
zz1.setTarget(OneId);
zz1.setSourceName(name1);
@ -151,7 +151,7 @@ public class ZhyFileManageServiceImpl {
String target = list1.get(i).getDocTitle();
// String aa = relationUtil.analyzeRelationship(source,target);
String aa = "属于";
String aa = "包含";
// System.out.println(aa);
//获取两个的Id
Long TwoId = list1.get(i).getId();
@ -175,7 +175,7 @@ public class ZhyFileManageServiceImpl {
String source = list2.get(a1).getDocTitle();
String target = list1.get(i).getDocTitle();
// String aa = relationUtil.analyzeRelationship(source,target);
String aa = "属于";
String aa = "包含";
System.out.println(aa);
//获取两个的Id
Long TwoId = list1.get(i).getId();
@ -199,7 +199,7 @@ public class ZhyFileManageServiceImpl {
for(int i=0;i<list1.size();i++){
String source = list3.get(a2).getDocTitle();
String target = list1.get(i).getDocTitle();
String aa = "属于";
String aa = "包含";
// String aa = relationUtil.analyzeRelationship(source,target);
System.out.println(aa);
//获取两个的Id
@ -225,7 +225,7 @@ public class ZhyFileManageServiceImpl {
for(int i=0;i<list1.size();i++){
String source = list4.get(a2).getDocTitle();
String target = list1.get(i).getDocTitle();
String aa = "属于";
String aa = "包含";
// String aa = relationUtil.analyzeRelationship(source,target);
System.out.println(aa);
//获取两个的Id
@ -250,7 +250,7 @@ public class ZhyFileManageServiceImpl {
for(int i=0;i<list1.size();i++){
String source = list5.get(a2).getDocTitle();
String target = list1.get(i).getDocTitle();
String aa = "属于";
String aa = "包含";
// String aa = relationUtil.analyzeRelationship(source,target);
System.out.println(aa);
//获取两个的Id

30
ruoyi-ui/src/views/system/SysPoint/index.vue

@ -74,9 +74,9 @@
type="danger" plain style="float: left" size="mini" @click="deletAllInfo">
一键清除
</el-button>
<el-button v-hasPermi="['system:SysPoint:add']" type="info" plain style="float: left" icon="el-icon-upload2" size="mini"
@click="handleImportRelation">导入文献
</el-button>
<!-- <el-button v-hasPermi="['system:SysPoint:add']" type="info" plain style="float: left" icon="el-icon-upload2" size="mini"-->
<!-- @click="handleImportRelation">导入文献-->
<!-- </el-button>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
@ -164,17 +164,17 @@ export default {
name: "SysPoint",
data() {
return {
upload1: {
tip: "准备上传文件",
open: false,
title: "",
oprnIno: false,
isUploading: false,
updateSupport: 0,
headers: {Authorization: "Bearer " + getToken()},
url: "http://localhost:10031/system/SysPoint/insertPoint"
// url: "http://127.0.0.1:10031/system/fileManage/addFile"
},
// upload1: {
// tip: "",
// open: false,
// title: "",
// oprnIno: false,
// isUploading: false,
// updateSupport: 0,
// headers: {Authorization: "Bearer " + getToken()},
// url: "http://localhost:10031/system/SysPoint/insertPoint"
// // url: "http://127.0.0.1:10031/system/fileManage/addFile"
// },
typeOptions: [
{ label: '作者', value: 'author' },
{ label: '机构', value: 'agency' },
@ -214,7 +214,7 @@ export default {
};
},
created() {
this.getList();
// this.getList();
},
methods: {
handleImportRelation() {

Loading…
Cancel
Save