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
09985688
Commit
09985688
authored
Aug 29, 2024
by
李苏
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整
parent
1b534eff
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
5 deletions
+52
-5
index.vue
src/views/yhlywsytst/yhlywsytst/index.vue
+52
-5
No files found.
src/views/yhlywsytst/yhlywsytst/index.vue
View file @
09985688
...
@@ -6,6 +6,9 @@
...
@@ -6,6 +6,9 @@
</div>
</div>
<!-- 视角工具栏-->
<!-- 视角工具栏-->
<div
class=
"toolButton2"
>
<div
class=
"toolButton2"
>
<div
class=
"flex1 text-center"
>
<el-checkbox
v-model=
"xzjj"
>
选中时近景
</el-checkbox>
</div>
<div
class=
"flex1 text-center"
>
<div
class=
"flex1 text-center"
>
<el-select
:popper-append-to-body=
'false'
style=
"width: 100px;background-color: rgba(0, 0, 0, 0.0);"
<el-select
:popper-append-to-body=
'false'
style=
"width: 100px;background-color: rgba(0, 0, 0, 0.0);"
@
change=
"flowPieDataChange"
v-model=
"flowPieData"
clearable
placeholder=
"绘制流动"
>
@
change=
"flowPieDataChange"
v-model=
"flowPieData"
clearable
placeholder=
"绘制流动"
>
...
@@ -18,9 +21,7 @@
...
@@ -18,9 +21,7 @@
<el-switch
style=
"color: #fff ;font-size: 12px;"
v-model=
"flowDirection"
active-text=
"正向"
inactive-text=
"反向"
>
<el-switch
style=
"color: #fff ;font-size: 12px;"
v-model=
"flowDirection"
active-text=
"正向"
inactive-text=
"反向"
>
</el-switch>
</el-switch>
</div>
</div>
<div
class=
"flex1 text-center"
>
<el-checkbox
v-model=
"xzjj"
>
选中时近景
</el-checkbox>
</div>
</div>
</div>
...
@@ -134,6 +135,7 @@
...
@@ -134,6 +135,7 @@
this
.
canNotMousedown
([
this
.
canNotMousedown
([
this
.
$refs
.
rightOpt
this
.
$refs
.
rightOpt
])
])
})
})
},
},
...
@@ -172,6 +174,7 @@
...
@@ -172,6 +174,7 @@
modelLoader
:
null
,
modelLoader
:
null
,
/* */
/* */
reMaterialQue
:
[],
reMaterialQue
:
[],
jzReMaterialQue
:
[],
allFlowObject
:
[]
allFlowObject
:
[]
}
}
...
@@ -180,12 +183,51 @@
...
@@ -180,12 +183,51 @@
flowDirection
()
{
flowDirection
()
{
if
(
this
.
allFlowObject
)
{
if
(
this
.
allFlowObject
)
{
this
.
allFlowObject
.
forEach
((
item
)
=>
{
this
.
allFlowObject
.
forEach
((
item
)
=>
{
item
.
reverseMapRotation
();
item
.
reverseMapRotation
();
});
});
}
}
}
}
},
},
methods
:
{
methods
:
{
apiJzbm
(){
/* 先清空 选中的机组*/
this
.
jzReMaterialQue
.
forEach
(
item
=>
{
item
.
revert
()
})
this
.
$post
(
'ksh/query'
,{
jzbm
:
1
}).
then
(
res
=>
{
if
(
res
.
success
){
let
sbxxList
=
res
.
data
.
records
||
[]
const
sbxxCodeList
=
sbxxList
.
map
(
item
=>
item
.
sbxxCode
)
this
.
viewer
.
scene
.
traverse
((
model
)
=>
{
if
(
model
.
isMesh
)
{
if
(
sbxxCodeList
.
includes
(
model
.
name
)){
let
jzReMaterialQueItem
=
{
model
,
material
:
model
.
material
.
clone
(),
revert
:
function
()
{
this
.
model
.
material
=
this
.
material
}
}
this
.
jzReMaterialQue
.
push
(
jzReMaterialQueItem
)
model
.
material
=
new
THREE
.
MeshPhongMaterial
({
color
:
new
THREE
.
Color
(
'rgba(255, 164, 7, 0.8)'
),
transparent
:
true
,
opacity
:
0.8
,
wireframe
:
false
,
})
}
}
});
}
})
},
/* 解决com和 相机控制器事件冲突的问题*/
/* 解决com和 相机控制器事件冲突的问题*/
canNotMousedown
(
domList
)
{
canNotMousedown
(
domList
)
{
domList
.
forEach
(
vdom
=>
{
domList
.
forEach
(
vdom
=>
{
...
@@ -272,8 +314,8 @@
...
@@ -272,8 +314,8 @@
color
:
"lightgreen"
,
color
:
"lightgreen"
,
side
:
2
,
side
:
2
,
map
:
{
map
:
{
image
:
"vt/resources/texture/arrow.png"
,
image
:
"vt/resources/texture/arrow
2
.png"
,
repeat
:
[
1
,
4
],
repeat
:
[
2
,
8
],
// rotation: direction ? Math.PI : 0,
// rotation: direction ? Math.PI : 0,
wrapS
:
THREE
.
RepeatWrapping
,
wrapS
:
THREE
.
RepeatWrapping
,
wrapT
:
THREE
.
RepeatWrapping
,
wrapT
:
THREE
.
RepeatWrapping
,
...
@@ -368,6 +410,11 @@
...
@@ -368,6 +410,11 @@
let
showNum
=
num
*
100
let
showNum
=
num
*
100
if
(
showNum
==
100
)
{
if
(
showNum
==
100
)
{
this
.
loadingText
=
`模型加载完毕,请稍等!`
this
.
loadingText
=
`模型加载完毕,请稍等!`
/* 机组高亮测试*/
setTimeout
(()
=>
{
this
.
apiJzbm
()
},
2000
)
}
else
{
}
else
{
this
.
loadingText
=
`正在加载模型
${
showNum
}
%!`
this
.
loadingText
=
`正在加载模型
${
showNum
}
%!`
}
}
...
...
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