From 2a2906147a245308dd5b831f05662d78a4b7e38d Mon Sep 17 00:00:00 2001
From: hanyuqing <1106611654@qq.com>
Date: Sat, 27 Sep 2025 13:03:01 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E6=96=87=E4=BB=B6?=
=?UTF-8?q?=E5=A4=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
gyxtp/src/view/graphPageCopy0926.vue | 53 +++++++++++++++++++++---------------
1 file changed, 31 insertions(+), 22 deletions(-)
diff --git a/gyxtp/src/view/graphPageCopy0926.vue b/gyxtp/src/view/graphPageCopy0926.vue
index 08e06a0..89c3db5 100644
--- a/gyxtp/src/view/graphPageCopy0926.vue
+++ b/gyxtp/src/view/graphPageCopy0926.vue
@@ -295,7 +295,7 @@ export default {
defaultExpandHolderSize: 16,
defaultExpandHolderColor: '#fff',
defaultExpandHolderBorder: '1px solid #00d7e0',
-
+ isMoveByParentNode: true,
allowSwitchLineShape: true,
allowSwitchJunctionPoint: true,
defaultLineColor: '#2E74B5',
@@ -318,13 +318,14 @@ export default {
layout: {
layoutName: 'center', // 关键:使用 center 布局
from: 'center', // 从中心向外扩展
- levelDistance: '3000,3000,3000,3000,3000,3000,3000,3000', // 每一层的半径(可动态修改)
- nodeDistance: 10, // 同一层节点间的最小角度间距(影响密度)
- min_per_width: 200, // 最小水平间隔(角度相关)
- max_per_width: 100,
+ levelDistance: '700,700,900,900,1000,1000,1000,1000', // 每一层的半径(可动态修改)
+ nodeDistance: 20, // 同一层节点间的最小角度间距(影响密度)
+ min_per_width: 300, // 最小水平间隔(角度相关)
+ max_per_width: 500,
clockwise: true, // 是否顺时针排列
startAngle: -Math.PI / 2, // 起始角度(-90°,顶部开始)
- preventOverlap: true // 防止重叠
+ preventOverlap: true, // 防止重叠
+ distance_coefficient: 5,
}
},
currentNode: {}, // 选中的节点对象
@@ -636,10 +637,10 @@ export default {
const nodes = this.heightLight.nodes;
const nodes1 = this.heightLight.nodes1;
if (nodes==undefined){
- return "";
+ return "nodeclassnormal";
}
if (nodes.length === 0&&nodes1.length === 0) {
- return "";
+ return "nodeclassnormal";
}
// 将传入的 id 转为字符串
const targetId = String(name).trim();
@@ -657,7 +658,7 @@ export default {
found = found || found2
// 找到了返回 'nodeclass',否则返回 ''
- return found ? 'nodeclass' : '';
+ return found ? 'nodeclass' : 'nodeclassnormal';
},
getLinesClass(mergedDbIds) {
console.log("44444444444444")
@@ -824,42 +825,42 @@ export default {
switch (levelNum) {
case 0:
color = 'rgb(227,203,0)';
- fontSize = '200px';
+ fontSize = '30px';
fontColor = 'rgb(255,255,255)';
break;
case 1:
color = 'rgb(47,47,230)';
- fontSize = '200px';
+ fontSize = '30px';
fontColor = 'rgb(255,255,255)';
break;
case 2:
color = 'rgb(255,138,0)';
- fontSize = '200px';
+ fontSize = '30px';
fontColor = 'rgb(255,255,255)';
break;
case 3:
color = 'rgb(30,255,0)';
- fontSize = '200px';
+ fontSize = '30px';
fontColor = 'rgb(0,0,0)';
break;
case 4:
color = 'rgb(248,143,248)';
- fontSize = '200px';
+ fontSize = '30px';
fontColor = 'rgb(255,255,255)';
break;
case 5:
color = 'rgb(65,154,255)';
- fontSize = '200px';
+ fontSize = '30px';
fontColor = 'rgb(255,255,255)';
break;
case 6:
color = 'rgb(0,228,255)';
- fontSize = '200px';
+ fontSize = '30px';
fontColor = 'rgb(0,0,0)';
break;
default:
color = 'rgb(200,200,200)';
- fontSize = '200px';
+ fontSize = '30px';
fontColor = 'rgb(255,255,255)';
}
@@ -871,6 +872,7 @@ export default {
if (node.groupId==this.currentGroup || node.docLeve=="0"){
// 添加节点
nodes.push({
+ fontSize:100,
id: node.id,
text: node.name,
data: {
@@ -881,10 +883,11 @@ export default {
// x: x,
// y: y,
// fixed: true,
- width: 150,
- height: 150,
+ width: 220,
+ height: 220,
color: color,
font: `normal ${fontSize} Arial`,
+ // html:"
"+node.name+"
",
fontColor: fontColor,
expandHolderPosition: 'right',
expanded: true,
@@ -1175,9 +1178,9 @@ export default {
to: line.target,
text: line.relate || '相关',
color:
- line.num <= 5 ? 'rgb(255, 255, 255)' : // 白色
- line.num <= 10 ? 'rgb(0, 255, 0)' : // 绿色
- line.num <= 15 ? 'rgb(255, 255, 0)' : // 黄色
+ line.num <= 5 ? '#fff' : // 白色
+ line.num <= 10 ? '#0f0' : // 绿色
+ line.num <= 15 ? '#ff0' : // 黄色
'rgb(178,246,255)', // 红色(包含line.num <= 20和超过20的情况)
lineWidth:num,
lineShape: 1,
@@ -1857,6 +1860,9 @@ tr {
/* 确保边框在填充之上 */
paint-order: stroke fill !important;
}
+.nodeclassnormal{
+ font-size: 30px !important;
+}
.el-table .warning-row {
background: oldlace;
}
@@ -1903,4 +1909,7 @@ tr {
.flow-tree:hover {
background-color: rgba(255, 255, 255, 0.1);
}
+.c-node-text{
+
+}
\ No newline at end of file
From ec6f9cdc9550c43dc04cf8baf09c39daf8345694 Mon Sep 17 00:00:00 2001
From: hanyuqing <1106611654@qq.com>
Date: Sat, 27 Sep 2025 18:16:00 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E6=96=87=E4=BB=B6?=
=?UTF-8?q?=E5=A4=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
gyxtp/src/view/graphPageCopy0926.vue | 6 +-
.../controller/system/ZhyFileManageController.java | 38 ++++----
.../system/ZhyRelationshipController.java | 11 ++-
.../com/ruoyi/api/controller/DocApiController.java | 16 ++--
ruoyi-ui/src/views/system/docmuban/index.vue | 106 ++++++++++++---------
ruoyi-ui/src/views/system/fileManage/index.vue | 16 ++--
6 files changed, 109 insertions(+), 84 deletions(-)
diff --git a/gyxtp/src/view/graphPageCopy0926.vue b/gyxtp/src/view/graphPageCopy0926.vue
index 89c3db5..57028c6 100644
--- a/gyxtp/src/view/graphPageCopy0926.vue
+++ b/gyxtp/src/view/graphPageCopy0926.vue
@@ -538,8 +538,8 @@ export default {
data.g13["docTitle"] = data.g13["name"]
data.g14["level"] = 1
data.g14["docTitle"] = data.g14["name"]
- data.g15["level"] = 1
- data.g15["docTitle"] = data.g15["name"]
+ // data.g15["level"] = 1
+ // data.g15["docTitle"] = data.g15["name"]
data.g21["level"] = 1
data.g21["docTitle"] = data.g21["name"]
data.g22["level"] = 1
@@ -553,7 +553,7 @@ export default {
this.data1.push(data.g12)
this.data1.push(data.g13)
this.data1.push(data.g14)
- this.data1.push(data.g15)
+ // this.data1.push(data.g15)
this.data1.push(data.g21)
this.data1.push(data.g22)
})
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyFileManageController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyFileManageController.java
index 95ee97f..8260ab6 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyFileManageController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyFileManageController.java
@@ -569,8 +569,8 @@ public class ZhyFileManageController extends BaseController {
List lists11=zhyDocmubanMapper.selectZhyDocmubanList(zhyDocmuban);
zhyDocmuban.setType("模型库");
List lists22=zhyDocmubanMapper.selectZhyDocmubanList(zhyDocmuban);
- zhyDocmuban.setType("规则库");
- List lists33=zhyDocmubanMapper.selectZhyDocmubanList(zhyDocmuban);
+// zhyDocmuban.setType("规则库");
+// List lists33=zhyDocmubanMapper.selectZhyDocmubanList(zhyDocmuban);
zhyDocmuban.setType("大类");
List lists44=zhyDocmubanMapper.selectZhyDocmubanList(zhyDocmuban);
zhyDocmuban.setType("小类");
@@ -669,37 +669,37 @@ public class ZhyFileManageController extends BaseController {
// }
nodeList.add(zhyDoc);
}
- for(int i=0;i docs=test1Mapper.selectAllDoc1();
if(zhyRelationship.getFileList().size()>0){
for(int i=0;i docs=test1Mapper.selectAllDoc1();
+
if(dd==null){
ZhyFileManage fileManage=test1Mapper.getFileById(docs.get(0).getFileId());
zhyRelationship.setSourceName(fileManage.getFileName().replaceAll("(?i)\\.docx$", ""));
@@ -207,7 +208,13 @@ public class ZhyRelationshipController extends BaseController
ZhyDoc vv = new ZhyDoc();
vv.setId(zhyRelationship.getSource());
ZhyDoc dd = test1Mapper.selectDocById(vv);
- zhyRelationship.setSourceName(dd.getDocTitle());
+ if(dd==null){
+ ZhyFileManage fileManage=test1Mapper.getFileById(docs.get(0).getFileId());
+ zhyRelationship.setSourceName(fileManage.getFileName().replaceAll("(?i)\\.docx$", ""));
+ }else{
+ zhyRelationship.setSourceName(dd.getDocTitle());
+ }
+// zhyRelationship.setSourceName(dd.getDocTitle());
vv.setId(zhyRelationship.getTarget());
ZhyDoc dd2 = test1Mapper.selectDocById(vv);
zhyRelationship.setTargetName(dd2.getDocTitle());
diff --git a/ruoyi-api/src/main/java/com/ruoyi/api/controller/DocApiController.java b/ruoyi-api/src/main/java/com/ruoyi/api/controller/DocApiController.java
index c52851b..f681518 100644
--- a/ruoyi-api/src/main/java/com/ruoyi/api/controller/DocApiController.java
+++ b/ruoyi-api/src/main/java/com/ruoyi/api/controller/DocApiController.java
@@ -1234,21 +1234,21 @@ public class DocApiController extends BaseController {
map12.put("name","模型库");
map12.put("children",g12);
+// Map map13=new HashMap<>();
+// map13.put("id",3);
+// map13.put("name","规则库");
+// map13.put("children",g13);
+
Map map13=new HashMap<>();
map13.put("id",3);
- map13.put("name","规则库");
+ map13.put("name","大类数据");
map13.put("children",g13);
Map map14=new HashMap<>();
map14.put("id",4);
- map14.put("name","大类数据");
+ map14.put("name","小类数据");
map14.put("children",g14);
- Map map15=new HashMap<>();
- map15.put("id",5);
- map15.put("name","小类数据");
- map15.put("children",g15);
-
Map map21=new HashMap<>();
map21.put("id",1);
map21.put("name","模型方法");
@@ -1269,7 +1269,7 @@ public class DocApiController extends BaseController {
mapAll.put("g12",map12);
mapAll.put("g13",map13);
mapAll.put("g14",map14);
- mapAll.put("g15",map15);
+// mapAll.put("g15",map15);
mapAll.put("g21",map21);
mapAll.put("g22",map22);
diff --git a/ruoyi-ui/src/views/system/docmuban/index.vue b/ruoyi-ui/src/views/system/docmuban/index.vue
index cb6ad19..480e32d 100644
--- a/ruoyi-ui/src/views/system/docmuban/index.vue
+++ b/ruoyi-ui/src/views/system/docmuban/index.vue
@@ -20,9 +20,9 @@
-
-
-
-
-
-
业务系统
+
-
-
模型库
+
+
+
@@ -174,31 +181,35 @@
-
-
规则库
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
- 修改
- 删除
-
-
-
-
-
-
大类
@@ -220,8 +231,12 @@
-
-
小类
+
-
模型
+
@@ -271,7 +289,10 @@
-
指标
+
@@ -379,7 +400,7 @@ export default {
},
{
key:1,
- text:"业务系统-模型库-规则库-大类-小类"
+ text:"业务系统-模型库-大类-小类"
},
{
key:2,
@@ -507,7 +528,6 @@ export default {
if(this.queryParams.groupId==1){
this.docmubanList11 = grouped["业务系统"] || [];
this.docmubanList12 = grouped["模型库"] || [];
- this.docmubanList13 = grouped["规则库"] || [];
this.docmubanList14 = grouped["大类"] || [];
this.docmubanList15 = grouped["小类"] || [];
}
@@ -537,7 +557,7 @@ export default {
this.form.groupId = 0;
}
- if(this.form.type == "业务系统" || this.form.type == "模型库" || this.form.type == "规则库" || this.form.type == "大类" || this.form.type == "小类"){
+ if(this.form.type == "业务系统" || this.form.type == "模型库" || this.form.type == "大类" || this.form.type == "小类"){
this.form.groupId = 1;
}
if(this.form.type == "模型" || this.form.type == "指标"){
diff --git a/ruoyi-ui/src/views/system/fileManage/index.vue b/ruoyi-ui/src/views/system/fileManage/index.vue
index 63680dd..05afbc9 100644
--- a/ruoyi-ui/src/views/system/fileManage/index.vue
+++ b/ruoyi-ui/src/views/system/fileManage/index.vue
@@ -614,7 +614,7 @@ export default {
},
{
key:1,
- text:"业务系统-模型库-规则库-大类-小类"
+ text:"业务系统-模型库-大类-小类"
},
{
key:2,
@@ -634,7 +634,7 @@ export default {
},
{
key:1,
- text:"业务系统-模型库-规则库-大类-小类"
+ text:"业务系统-模型库-大类-小类"
},
{
key:2,
@@ -680,9 +680,8 @@ export default {
1: [
{ label: "业务系统", value: "1", maxParentLevel: 0 },
{ label: "模型库", value: "2", maxParentLevel: 1 },
- { label: "规则库", value: "3", maxParentLevel: 2 },
- { label: "大类", value: "4", maxParentLevel: 3 },
- { label: "小类", value: "5", maxParentLevel: 4 }
+ { label: "大类", value: "3", maxParentLevel: 2 },
+ { label: "小类", value: "4", maxParentLevel: 3 }
],
2: [
{ label: "模型", value: "1", maxParentLevel: 0 },
@@ -699,9 +698,8 @@ export default {
1: [
{ label: "业务系统", value: "1" },
{ label: "模型库", value: "2" },
- { label: "规则库", value: "3" },
- { label: "大类", value: "4" },
- { label: "小类", value: "5" }
+ { label: "大类", value: "3" },
+ { label: "小类", value: "4" }
],
2: [
{ label: "模型", value: "1" },
@@ -1019,7 +1017,7 @@ export default {
formatGroup(row, column, cellValue) {
const map = {
0: "方向-作战-装备-环境",
- 1: "业务系统-模型库-规则库-大类-小类",
+ 1: "业务系统-模型库-大类-小类",
2: "模型-指标"
};
return map[cellValue] || '未知组别';