Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
template_vue
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
胡宝山
template_vue
Commits
a2f38d94
Commit
a2f38d94
authored
Jun 28, 2024
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修改
parent
5cc57b6f
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1257 additions
and
43 deletions
+1257
-43
planeGraph.js
src/api/planeGraph.js
+2
-1
graphWatch.vue
src/views/template/graph/graphWatch.vue
+3
-3
planeGraph.vue
src/views/template/planeGraph.vue
+69
-39
planeGraphDetails.vue
src/views/template/planeGraphDetails.vue
+1183
-0
No files found.
src/api/planeGraph.js
View file @
a2f38d94
...
...
@@ -19,10 +19,11 @@ import request from '@/utils/request'
// 查询最近一条数据
export
function
findLatestData
()
{
export
function
findLatestData
(
query
)
{
return
request
({
url
:
'/bichnography/findLatestData'
,
method
:
'get'
,
params
:
query
})
}
...
...
src/views/template/graph/graphWatch.vue
View file @
a2f38d94
...
...
@@ -559,9 +559,9 @@ export default {
mounted
()
{
let
dataToWatch
=
JSON
.
parse
(
localStorage
.
getItem
(
'dataToWatch'
));
console
.
log
(
'11111'
,
this
.
$route
.
query
.
type
)
let
dataToWatch
=
JSON
.
parse
(
localStorage
.
getItem
(
this
.
$route
.
query
.
type
+
'dataToWatch'
));
console
.
log
(
'dataToWatch'
,
dataToWatch
)
let
backDiv
=
document
.
getElementById
(
'popSuperBack'
)
backDiv
.
style
.
backgroundImage
=
dataToWatch
.
background
...
...
src/views/template/planeGraph.vue
View file @
a2f38d94
...
...
@@ -14,6 +14,16 @@
<!-- 左侧控制列 -->
<div
class=
"node-container"
>
<div>
<el-select
v-model=
"queryForm.type"
placeholder=
"请选择"
@
change=
"changeType"
>
<el-option
v-for=
"(item,index) in typeOptions"
:key=
"index"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</div>
<!-- 遍历nodeList里面的项,这应该就是左侧的选项卡列表 -->
<!-- 这个卡也跟着缩放了,感觉不太对劲 -->
<div
...
...
@@ -25,10 +35,10 @@
@mousedown="evt => nodeItemMouseDown(evt, item.value)"
>
<!-- 里面嵌套这层为卡片提供样式和信息之类,后面卡片样式判断可以在这里面做 -->
<div
class=
"flow-node ellipsis all"
<div
class=
"flow-node ellipsis all"
:style=
"
{backgroundImage: 'url('+item.value().meta.img+')' }"
>
</div>
/>
</div>
<!--
<el-input
...
...
@@ -41,7 +51,8 @@
style=
"
margin-top: 300px; "
type=
"success"
@
click=
"showBackGroundPage"
>
更换背景
</el-button>
@
click=
"showBackGroundPage"
>
更换背景
</el-button>
</div>
<!-- 最外层,加滚轮监听函数 -->
...
...
@@ -51,13 +62,13 @@
<div
class=
"super-flow-content"
>
<!-- @wheel="handleScroll" 阻止默认滚轮事件-->
<!-- @wheel="handleScroll" 阻止默认滚轮事件-->
<!-- 这下面删了个v-drag就不能拖动画布了 -->
<div
id=
"mainSuperBack"
ref=
"flowContainer"
class=
"flow-container"
style=
"width: 1920px;height: 1080px"
id=
"mainSuperBack"
>
<super-flow
ref=
"superFlow"
...
...
@@ -81,11 +92,10 @@
>
<el-row>
<div
:class=
"[meta.name]"
>
{{
meta
.
desc
}}
<div
:class=
"[meta.name]"
>
{{
meta
.
desc
}}
</div>
</el-row>
</div>
</
template
>
...
...
@@ -182,11 +192,10 @@
title=
"展示模式"
:visible
.
sync=
"observationMode"
:close-on-click-modal=
"false"
custom-class
=
"watchDialog"
custom-class
=
"watchDialog"
>
<div
style=
"width: 100%;"
>
<superFlowWatch
v-if=
"observationMode"
:dataToWatch=
"dataToWatch"
>
</superFlowWatch>
<superFlowWatch
v-if=
"observationMode"
:data-to-watch=
"dataToWatch"
/>
</div>
</el-dialog>
...
...
@@ -298,6 +307,14 @@ export default {
},
data
()
{
return
{
queryForm
:
{
type
:
'1'
},
typeOptions
:
[
{
value
:
'1'
,
label
:
'a'
},
{
value
:
'2'
,
label
:
'b'
},
{
value
:
'3'
,
label
:
'c'
},
],
timer
:
""
,
value
:
0
,
//链接数据
...
...
@@ -663,10 +680,11 @@ export default {
this
.
dataToWatch
.
nodeList
=
this
.
nodeList
this
.
dataToWatch
.
linkList
=
this
.
linkList
this
.
dataToWatch
.
background
=
document
.
getElementsByClassName
(
'flow-container'
)[
0
].
style
.
backgroundImage
localStorage
.
setItem
(
'dataToWatch'
,
JSON
.
stringify
(
this
.
dataToWatch
));
localStorage
.
removeItem
(
this
.
queryForm
.
type
+
'dataToWatch'
)
localStorage
.
setItem
(
this
.
queryForm
.
type
+
'dataToWatch'
,
JSON
.
stringify
(
this
.
dataToWatch
));
let
page
=
this
.
$router
.
resolve
({
path
:
'/graphWatch'
,
query
:
{
type
:
this
.
queryForm
.
type
}
})
window
.
open
(
page
.
href
,
'_blank'
);
},
...
...
@@ -775,14 +793,26 @@ export default {
// console.log('baobaoaoa');
let
post
=
{}
post
.
graph
=
JSON
.
stringify
(
data
)
post
.
type
=
this
.
queryForm
.
type
console
.
log
(
post
);
addBIchnography
(
post
).
then
(
res
=>
{
console
.
log
(
res
);
if
(
res
.
code
===
200
)
{
this
.
$message
({
message
:
'添加成功'
,
type
:
'success'
})
}
})
},
changeType
()
{
this
.
loadNodeListJson
()
},
// 从服务器获取存档并加载
loadNodeListJson
(){
findLatestData
().
then
(
res
=>
{
const
params
=
{
type
:
this
.
queryForm
.
type
}
findLatestData
(
params
).
then
(
res
=>
{
let
data
=
JSON
.
parse
(
res
.
data
.
graph
)
// data是获取到的信息
...
...
src/views/template/planeGraphDetails.vue
0 → 100644
View file @
a2f38d94
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment