Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zghywpc-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
李苏
zghywpc-vue
Commits
39bd4f73
Commit
39bd4f73
authored
Nov 07, 2024
by
李苏
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模型溯源后隐藏不涉及模型后,可以再重置后再次隐藏
parent
3f8cf9e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
56 deletions
+57
-56
index.vue
src/views/yhlywsytst/yhlywsytst/index.vue
+57
-56
No files found.
src/views/yhlywsytst/yhlywsytst/index.vue
View file @
39bd4f73
...
...
@@ -2,7 +2,7 @@
* @Description:
* @Author: lisu lisu@gavelinfo.com
* @LastEditors: lisu lisu@gavelinfo.com
* @LastEditTime: 2024-1
0-31 17:18:17
* @LastEditTime: 2024-1
1-07 15:40:00
* @FilePath: /zghywpc-vue/src/views/yhlywsytst/yhlywsytst/index.vue
-->
<
template
>
...
...
@@ -357,7 +357,7 @@
<el-button
style=
"background-color: rgba(7,32,96,0.0);border: 1px solid #68D8FE; color: #68D8FE;"
size=
"mini"
@
click=
"sypc()"
type=
"primary"
>
排查
</el-button>
<el-button
style=
"background-color: rgba(7,32,96,0.0);border: 1px solid #68D8FE; color: #68D8FE;"
size=
"mini"
@
click=
"czmx()"
type=
"primary"
>
重置
</el-button>
size=
"mini"
@
click=
"czmx()"
type=
"primary"
>
{{
czmxzt
==
'A'
?
'重置'
:
'隐藏'
}}
</el-button>
<el-button
@
click=
"savePdf()"
style=
"background-color: rgba(7,32,96,0.0);border: 1px solid #68D8FE; color: #68D8FE;"
size=
"mini"
type=
"primary"
>
日志
</el-button>
...
...
@@ -596,7 +596,9 @@
},
data
()
{
return
{
/* 最近的排查信息*/
lastRes
:{},
czmxzt
:
'A'
,
showLeft
:
false
,
/* 材质辅助输入*/
cztypeConfig
:
{
...
...
@@ -729,18 +731,36 @@
this
.
showDialog
=
true
},
czmx
()
{
this
.
viewer
.
scene
.
traverse
((
model
)
=>
{
if
(
model
.
isMesh
)
{
model
.
visible
=
true
}
});
if
(
this
.
allFlowObject
.
length
)
{
this
.
allFlowObject
.
forEach
((
item
)
=>
{
item
.
removeFromParent
();
/* A 代表初始状态 和查询后状态*/
if
(
this
.
czmxzt
==
'A'
){
this
.
viewer
.
scene
.
traverse
((
model
)
=>
{
if
(
model
.
isMesh
)
{
model
.
visible
=
true
}
});
this
.
allFlowObject
=
[];
if
(
this
.
allFlowObject
.
length
)
{
this
.
allFlowObject
.
forEach
((
item
)
=>
{
item
.
removeFromParent
();
});
this
.
allFlowObject
=
[];
}
if
(
Object
.
keys
(
this
.
lastRes
).
length
==
0
){
this
.
$warning
(
'暂无最近的溯源数据'
)
}
else
{
this
.
czmxzt
=
'B'
}
}
else
{
/* 如果是B的话代表 模型处理过,还原回去了*/
this
.
sypcMethods2
(
this
.
lastRes
)
this
.
czmxzt
=
'A'
}
},
/* xsqbmx相关设置废除*/
xsqbmx
()
{
...
...
@@ -787,68 +807,49 @@
link
.
target
=
'_blank'
;
// 在新标签页中打开
link
.
click
();
link
.
remove
()
// const downloadLink = document.createElement('a');
// downloadLink.href = linkSource;
// downloadLink.target = '_blank'
// const fileName = '排除日志.pdf';
// downloadLink.download = fileName;
// downloadLink.click();
// downloadLink.remove()
}
else
{
this
.
$warning
(
'请溯源后,再保存为排查日志'
)
}
},
sypcMethods2
(
res
){
let
sbxxList
=
res
.
data
.
records
.
kshSbInfos
||
[]
const
sbxxCodeList
=
sbxxList
.
map
(
item
=>
item
.
sbxxCode
)
this
.
viewer
.
scene
.
traverse
((
model
)
=>
{
if
(
model
.
isMesh
)
{
let
isbh
=
false
sbxxCodeList
.
forEach
(
item
=>
{
if
(
model
.
name
.
includes
(
item
))
{
isbh
=
true
}
})
if
(
isbh
)
{
model
.
visible
=
true
}
else
{
if
(
model
.
name
&&
model
.
name
!=
'地面'
)
{
model
.
visible
=
false
}
}
}
});
},
sypcMethods
(
res
)
{
// function byteStringToUint8Array(byteString) {
// const byteArray = new Uint8Array(byteString.length);
// for (let i = 0; i
<
byteString
.
length
;
i
++
)
{
// byteArray[i] = byteString.charCodeAt(i);
// }
// return byteArray;
// }
// let byteArray =byteStringToUint8Array(res.data.records.pdfBytes)
// const blob = new Blob([byteArray], { type: 'application/pdf' });
// const url = URL.createObjectURL(blob);
// const a = document.createElement('a');
// a.href = url;
// a.download = 'document.pdf'; // 设置下载文件名
// // 触发下载
// document.body.appendChild(a);
// a.click();
// a.remove()
this
.
lastRes
=
res
this
.
pdfBytes
=
res
.
data
.
records
.
pdfBytes
let
gnwz
=
res
.
data
.
records
.
gnwz
/* -
-*/
let
sbxxList
=
res
.
data
.
records
.
kshSbInfos
||
[]
let
zbInfos
=
res
.
data
.
records
.
zbInfos
||
[]
/* 进行标记设备*/
this
.
$success
(
`已标记
${
sbxxList
.
length
}
个设备`
)
const
sbxxCodeList
=
sbxxList
.
map
(
item
=>
item
.
sbxxCode
)
/* 匹配设备信息length==0 */
if
(
sbxxCodeList
.
length
==
0
)
{
return
}
/* 解决 先缓存选中色,后渲染黄色,默认选中时颜色不对
bug: 1默认还原为原色
2.高亮为黄色触发默认选中(黄色存储在另一个队列)
3.默认选中会还原上一个颜色
4.还原为原色,触发选中。变为选中色,清除为原色,覆盖了亮色
*/
if
(
sbxxCodeList
.
length
!=
0
)
{
this
.
reMaterialQue
.
forEach
(
item
=>
{
item
.
revert
()
})
}
this
.
reMaterialQue
.
splice
(
0
,
this
.
reMaterialQue
.
length
)
/* 分割,在渲染高亮清空选中的*/
this
.
viewer
.
scene
.
traverse
((
model
)
=>
{
if
(
model
.
isMesh
)
{
let
isbh
=
false
...
...
@@ -857,7 +858,6 @@
isbh
=
true
}
})
if
(
isbh
)
{
model
.
visible
=
true
let
jzReMaterialQueItem
=
{
...
...
@@ -876,7 +876,6 @@
})
}
else
{
/* 隐藏其他设备*/
if
(
model
.
name
&&
model
.
name
!=
'地面'
)
{
model
.
visible
=
false
}
...
...
@@ -971,6 +970,8 @@
this
.
loading
=
true
this
.
loadingText
=
'正在处理,请稍等。'
/* 展示重置模型*/
this
.
czmxzt
=
'A'
/* 如果流动特性只能从高到底*/
if
(
this
.
sypcQueryParams
.
ldtx
==
'B'
){
...
...
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