Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
ydLife
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sweet Zhang
ydLife
Commits
a57ba27b
Commit
a57ba27b
authored
Sep 06, 2023
by
zeyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决iframe刷新多次的问题
parent
b96196fa
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
4 deletions
+29
-4
src/app/my/my-business-detail/my-business-detail.component.html
+9
-4
src/app/my/my-business-detail/my-business-detail.component.ts
+20
-0
No files found.
src/app/my/my-business-detail/my-business-detail.component.html
View file @
a57ba27b
...
...
@@ -211,10 +211,8 @@
</div>
</div>
<!-- SFP咨询问卷 -->
<iframe
class=
"content"
*
ngIf=
"selectedId===2 && isSfpShow == true"
[
src
]="
transform
(
iframeUrl
)"
style=
"width: 100%;flex-grow: 1;border: medium none;"
>
</iframe>
<!-- 客户告知书 -->
<div
class=
"content"
*
ngIf=
"selectedId===5"
>
<ydlife-e-notice
[
agreeFlag
]="
false
"
></ydlife-e-notice>
...
...
@@ -347,6 +345,12 @@
</Modal>
</div>
</div>
<!-- SFP咨询问卷 -->
<div
id=
"iframeDiv"
style=
"width: 100%;flex-grow: 1;border: medium none;display:flex"
>
<!-- <iframe [src]="transform(iframeUrl)"
style="width: 100%;flex-grow: 1;border: medium none;">
</iframe> -->
</div>
</div>
<ydlife-toast
*
ngIf=
"toastDialog"
[
toastInfo
]="
toastInfo
"
></ydlife-toast>
<ydlife-alert
*
ngIf=
"isNeedAlert"
[
dialogInfo
]="
dialogInfo
"
(
popInfo
)="
getPopInfo
()"
></ydlife-alert>
\ No newline at end of file
src/app/my/my-business-detail/my-business-detail.component.ts
View file @
a57ba27b
...
...
@@ -201,11 +201,31 @@ export class MyBusinessDetailComponent implements OnInit {
}
selectTab
(
id
)
{
if
(
id
==
this
.
selectedId
){
return
;
}
if
(
this
.
clickFlag
==
true
)
{
this
.
selectedId
=
id
;
}
else
{
this
.
selectedId
=
1
;
}
if
(
this
.
selectedId
===
2
&&
this
.
isSfpShow
==
true
){
let
iframe
=
document
.
createElement
(
'iframe'
);
// iframe.src = this.transform(this.iframeUrl);
iframe
.
src
=
this
.
iframeUrl
;
iframe
.
width
=
'100%'
;
iframe
.
frameBorder
=
'medium none'
;
iframe
.
setAttribute
(
"style"
,
"flex-grow:1"
);
document
.
getElementById
(
"iframeDiv"
).
appendChild
(
iframe
);
}
else
{
let
iframeDiv
=
document
.
getElementById
(
"iframeDiv"
);
let
iframe
=
document
.
getElementsByTagName
(
"iframe"
);
if
(
iframe
.
length
!=
0
){
iframeDiv
.
removeChild
(
iframe
[
0
]);
}
}
}
// 查看报告
viewReport
()
{
...
...
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