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
cc616e46
authored
2023-08-25 12:24:36 +0800
by
renchao@pashanhoo.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style;证书预览
1 parent
5f8c1bc9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
8 deletions
src/views/workflow/components/dialog/zsdy.vue
src/views/workflow/components/dialog/zsdy.vue
View file @
cc616e4
...
...
@@ -189,16 +189,34 @@
})
})
}
// context.fillText(this.bdcqz.syqx ? this.bdcqz.syqx : '', 129, 429);
//
qlqtzk
const
maxWidth
=
33
0
;
// 最大宽度限制
//
权利其他状态
const
maxWidth
=
33
2
;
// 最大宽度限制
let
lines
=
this
.
bdcqz
.
qlqtzk
?
this
.
bdcqz
.
qlqtzk
.
split
(
'\n'
)
:
[];
lines
.
forEach
((
line
,
index
)
=>
{
const
y
=
463
+
(
index
*
40
);
// 每行文本的垂直位置
// lines.forEach((line, index) => {
// const y = 463 + (index * 33); // 每行文本的垂直位置
// let currentLine = '';
// let arr = [];
// for (let word of line) {
// const testLine = currentLine + word;
// const lineWidth = context.measureText(testLine).width;
// if (lineWidth <= maxWidth) {
// currentLine = testLine;
// } else {
// arr.push(currentLine);
// currentLine = word;
// }
// }
// arr.push(currentLine);
// arr.forEach((line, index) => {
// context.fillText(line, 129, y + (index * 17)); // 调整行高
// })
// })
for
(
let
i
=
0
;
i
<
lines
.
length
;
i
++
)
{
if
(
getByteLen
(
lines
[
i
])
>
41
)
{
let
currentLine
=
''
;
let
arr
=
[];
for
(
let
word
of
line
)
{
for
(
let
word
of
lines
[
i
]
)
{
const
testLine
=
currentLine
+
word
;
const
lineWidth
=
context
.
measureText
(
testLine
).
width
;
if
(
lineWidth
<=
maxWidth
)
{
...
...
@@ -210,9 +228,13 @@
}
arr
.
push
(
currentLine
);
arr
.
forEach
((
line
,
index
)
=>
{
context
.
fillText
(
line
,
129
,
y
+
(
index
*
20
));
// 调整行高
})
context
.
fillText
(
line
,
129
,
490
+
(
28
*
(
i
-
1
))
+
(
index
*
14
));
// 调整行高
})
}
else
{
context
.
fillText
(
lines
[
i
]
?
lines
[
i
]
:
''
,
129
,
495
+
(
30
*
(
i
-
1
)));
}
}
let
lines1
=
this
.
bdcqz
.
fj
?
this
.
bdcqz
.
fj
.
split
(
'\n'
)
:
[];
lines1
.
forEach
((
line
,
index
)
=>
{
const
y
=
100
+
(
index
*
30
);
// 每行文本的垂直位置
...
...
Please
register
or
sign in
to post a comment