From 6e5cfe44f7d621a64ced0121d8fcb499c1db5e89 Mon Sep 17 00:00:00 2001
From: xyc <jc_xiong@hotmail.com>
Date: 星期六, 12 十月 2024 10:34:33 +0800
Subject: [PATCH] 修改RBD识别算法
---
web/src/views/modules/taskReliability/TimeDiagramTemp.vue | 158 ----------------------------------------------------
1 files changed, 1 insertions(+), 157 deletions(-)
diff --git a/web/src/views/modules/taskReliability/TimeDiagramTemp.vue b/web/src/views/modules/taskReliability/TimeDiagramTemp.vue
index f5fa205..cd5301c 100644
--- a/web/src/views/modules/taskReliability/TimeDiagramTemp.vue
+++ b/web/src/views/modules/taskReliability/TimeDiagramTemp.vue
@@ -5,53 +5,6 @@
<div style="height: 80vh">
<div class="fa-card-a">
<div id="stencil"></div>
-
- <div style="height: 42vh;margin-top: 30px;background: #f5f5f5;padding-bottom:20px ">
- <h3 style="background: #ededed;font-size: 12px;height: 32px;line-height: 32px;padding: 0 5px 0 8px">
- 瀵归綈鏂瑰紡</h3>
- <div style="text-align: center">
- <el-tooltip class="item" effect="dark" content="宸﹀榻�" placement="left">
- <el-button class="" style="margin-left: 0;padding: 2px;border: 1px solid #5F95FF;"
- @click="leftAlign()"><i style="font-size: 2rem;color: #5F95FF"
- class="wt-iconfont icon-zuoduiqi"></i></el-button>
- </el-tooltip>
- </div>
- <div style="text-align: center">
- <el-tooltip class="item" effect="dark" content="灞呬腑瀵归綈" placement="left">
- <el-button style="margin-left: 0;margin-top: 10px;padding: 2px;border: 1px solid #5F95FF"
- @click="centerAlign()"><i style="font-size: 2rem;color: #5F95FF"
- class="wt-iconfont icon-chuizhiduiqi"></i></el-button>
- </el-tooltip>
- </div>
- <div style="text-align: center">
- <el-tooltip class="item" effect="dark" content="鍙冲榻�" placement="left">
- <el-button style="margin-left: 0;margin-top: 10px;padding: 2px;border: 1px solid #5F95FF"
- @click="rightAlign()"><i style="font-size: 2rem;color: #5F95FF"
- class="wt-iconfont icon-youduiqi"></i></el-button>
- </el-tooltip>
- </div>
- <div style="text-align: center">
- <el-tooltip class="item" effect="dark" content="椤堕儴瀵归綈" placement="left">
- <el-button style="margin-left: 0;margin-top: 10px;padding: 2px;border: 1px solid #5F95FF"
- @click="topAlign()"><i style="font-size: 2rem;color:#5F95FF"
- class="wt-iconfont icon-dingduiqi"></i></el-button>
- </el-tooltip>
- </div>
- <div style="text-align: center">
- <el-tooltip class="item" effect="dark" content="姘村钩瀵归綈" placement="left">
- <el-button style="margin-left: 0;margin-top: 10px;padding: 2px;border: 1px solid #5F95FF"
- @click="shuipingAlign()"><i style="font-size: 2rem;color:#5F95FF"
- class="wt-iconfont icon-shuipingduiqi"></i></el-button>
- </el-tooltip>
- </div>
- <div style="text-align: center">
- <el-tooltip class="item" effect="dark" content="搴曢儴瀵归綈" placement="left">
- <el-button style="margin-left: 0;margin-top: 10px;padding: 2px;border: 1px solid #5F95FF"
- @click="bottomAlign()"><i style="font-size: 2rem;color:#5F95FF"
- class="wt-iconfont icon-diduiqi"></i></el-button>
- </el-tooltip>
- </div>
- </div>
</div>
</div>
</el-col>
@@ -294,9 +247,7 @@
},
watch: {
'$route.params.configId'() {
- // alert('$route.params.projectId change')
this.projectId = this.$route.params.projectId
- //this.diagramId = this.$route.params.diagramId
console.log(this.$route.params.projectId, 'this.$route.params.projectId')
console.log(this.$route.params.diagramId, 'this.$route.params.diagramId')
this.projectChange2(this.$route.params.diagramId)
@@ -372,20 +323,11 @@
if (res.data !== null && res.data.content != null) {
this.dataForm = res.data
this.diagramJson = JSON.parse(this.dataForm.content)
- // console.log(this.dataForm.content,'this.Diagram content')
console.log(this.diagramJson, 'this.Diagram json')
this.graph.fromJSON(this.diagramJson)
- // this.graph.centerContent()
- // this.graph.zoomToFit()
} else {
this.dataForm.id = null
- // await this.$alert('璇ラ」鐩繕鏈紪鍒剁綉缁滃浘', '鎻愮ず', {
- // confirmButtonText: '纭畾'
- // })
this.graph.fromJSON(this.emptyJson)
- // this.graph.centerContent()
- // this.graph.zoomToFit()
- // this.graph.freeze()
}
},
init() {
@@ -414,19 +356,6 @@
})
}
},
- // translating: {
- // restrict(view) {
- // const cell = view.cell
- // if (cell.isNode()) {
- // const parent = cell.getParent()
- // if (parent) {
- // return parent.getBBox()
- // }
- // }
- //
- // return null
- // },
- // },
onToolItemCreated({tool}) {
const handle = tool
const options = handle.options
@@ -492,14 +421,6 @@
text: ''
}
},
- // position: {
- // distance: 0.5,
- // angle: 180,
- // options: {
- // keepGradient: true,
- // ensureLegibility: true
- // }
- // }
}],
zIndex: 0,
})
@@ -752,80 +673,13 @@
},
true,
)
- // 涓�绾х綉缁滃浘鐨勬棩鏈熸枃瀛楄妭鐐�
- const r5 = this.graph.createNode({
- shape: 'custom-circle',
- data: {
- dataId: '',
- finishDate: '',
- inspectName: ''
- },
- label: '闃舵',
- })
- // 浜岀骇缃戠粶鍥炬棩鏈熻妭鐐�
- const r6 = this.graph.createNode({
- shape: 'custom-circle1',
- data: {
- dataId: '',
- finishDate: '',
- inspectName: ''
- },
- })
// 浜岀骇缃戠粶鍥炬枃瀛楄妭鐐�
const r9 = this.graph.createNode({
shape: 'custom-rect'
})
- const scaleImgCenter = this.graph.createNode({
- shape: 'image',
- imageUrl: require('@/assets/img/scale/center.jpg'),
- width: 36,
- height: 20,
- data: {
- imagePost: 'center'
- }
- })
-
- const scaleImgTop = this.graph.createNode({
- shape: 'image',
- imageUrl: require('@/assets/img/scale/top.jpg'),
- width: 36,
- height: 20,
- data: {
- imagePost: 'top'
- }
- })
-
- const scaleImgRight = this.graph.createNode({
- shape: 'image',
- imageUrl: require('@/assets/img/scale/right.jpg'),
- width: 36,
- height: 20,
- data: {
- imagePost: 'right'
- }
- })
- const scaleImgBottom = this.graph.createNode({
- shape: 'image',
- imageUrl: require('@/assets/img/scale/bottom.jpg'),
- width: 36,
- height: 20,
- data: {
- imagePost: 'bottom'
- }
- })
- const scaleImgLeft = this.graph.createNode({
- shape: 'image',
- imageUrl: require('@/assets/img/scale/left.jpg'),
- width: 36,
- height: 20,
- data: {
- imagePost: 'left'
- }
- })
-
// scaleImgTop.setAttribute('crossOrigin', 'Anonymous')
- stencil.load([r5, r6, r9, scaleImgTop, scaleImgCenter, scaleImgRight, scaleImgBottom, scaleImgLeft], 'group1')
+ stencil.load([r9], 'group1')
this.graph.bindKey(['meta+c', 'ctrl+c'], () => {
const cells = this.graph.getSelectedCells()
if (cells.length) {
@@ -940,16 +794,6 @@
})
//鍗曞嚮杈硅妭鐐�
this.graph.on('edge:click', ({edge}) => {
- // this.reset()
- edge.attr('line/stroke', '#5F95FF')
- edge.prop('labels/0', {
- attrs: {
- body: {
- stroke: '#5F95FF',
- },
- },
-
- })
})
// 鍗曞嚮node鑺傜偣
this.graph.on('node:click', ({node}) => {
--
Gitblit v1.9.1