Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcdj-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
22d6462f
authored
2023-08-25 09:32:14 +0800
by
renchao@pashanhoo.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:证书预览
1 parent
4d89f4e2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
2 deletions
src/views/workflow/components/dialog/zsyl.vue
src/views/workflow/components/dialog/zsyl.vue
View file @
22d6462
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-08-25 09:
23:55
* @LastEditTime: 2023-08-25 09:
31:57
-->
<
template
>
<div
class=
"from-clues loadingtext"
v-Loading=
"loading"
element-loading-text=
"拼命加载中..."
style=
"height:720px;text-align: center;"
>
...
...
@@ -148,7 +148,7 @@
context
.
fillText
(
this
.
bdcqz
.
mj
?
this
.
bdcqz
.
mj
:
''
,
129
,
386
);
// context.fillText(this.bdcqz.syqx ? this.bdcqz.syqx : '', 129, 429);
// qlqtzk
const
maxWidth
=
33
6
;
// 最大宽度限制
const
maxWidth
=
33
3
;
// 最大宽度限制
let
lines
=
this
.
bdcqz
.
qlqtzk
?
this
.
bdcqz
.
qlqtzk
.
split
(
'\n'
)
:
[];
lines
.
forEach
((
line
,
index
)
=>
{
const
y
=
463
+
(
index
*
40
);
// 每行文本的垂直位置
...
...
@@ -190,6 +190,7 @@
})
})
let
lines3
=
this
.
bdcqz
.
syqx
?
this
.
bdcqz
.
syqx
.
split
(
' '
)
:
[];
if
(
lines3
.
length
>=
22
)
{
lines3
.
forEach
((
line
,
index
)
=>
{
const
y
=
423
+
(
index
*
27
);
// 每行文本的垂直位置
let
currentLine
=
''
;
...
...
@@ -209,6 +210,27 @@
context
.
fillText
(
line
,
129
,
y
+
(
index
*
20
));
// 调整行高
})
})
}
else
{
lines3
.
forEach
((
line
,
index
)
=>
{
const
y
=
430
+
(
index
*
27
);
// 每行文本的垂直位置
let
currentLine
=
''
;
let
arr
=
[];
for
(
let
word
of
line
)
{
const
testLine
=
currentLine
+
word
;
const
lineWidth
=
context
.
measureText
(
testLine
).
width
;
if
(
lineWidth
<=
315
)
{
currentLine
=
testLine
;
}
else
{
arr
.
push
(
currentLine
);
currentLine
=
word
;
}
}
arr
.
push
(
currentLine
);
arr
.
forEach
((
line
,
index
)
=>
{
context
.
fillText
(
line
,
129
,
y
+
(
index
*
20
));
// 调整行高
})
})
}
...
...
Please
register
or
sign in
to post a comment