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
ca124469
authored
2024-01-17 10:34:04 +0800
by
renchao@pashanhoo.com
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'dev'
2 parents
498c2c0b
3d92380f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
115 additions
and
15 deletions
src/views/workflow/components/dialog/zsdy.vue
src/views/workflow/components/dialog/zsyl.vue
src/views/workflow/components/dialog/zsdy.vue
View file @
ca12446
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2024-01-17
09:26:42
* @LastEditTime: 2024-01-17
10:33:10
-->
<
template
>
<div>
...
...
@@ -510,11 +510,97 @@
context
.
fillText
(
this
.
bdcqz
.
sxqc
?
this
.
bdcqz
.
sxqc
:
''
,
750
,
125
);
context
.
fillText
(
this
.
bdcqz
.
sxh
?
this
.
bdcqz
.
sxh
:
''
,
960
,
123
);
context
.
fillText
(
this
.
bdcqz
.
zmqlhsx
?
this
.
bdcqz
.
zmqlhsx
:
''
,
775
,
180
);
context
.
fillText
(
this
.
bdcqz
.
qlr
?
this
.
bdcqz
.
qlr
:
''
,
775
,
228
);
//
context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 775, 228);
// 义务人
context
.
fillText
(
this
.
bdcqz
.
ywr
?
this
.
bdcqz
.
ywr
:
''
,
775
,
275
);
// context.fillText(this.bdcqz.ywr ? this.bdcqz.ywr : '', 775, 275);
// 权利人
let
qlrlines
=
this
.
bdcqz
.
qlr
?
this
.
bdcqz
.
qlr
.
split
(
' '
)
:
[];
if
(
getByteLen
(
this
.
bdcqz
.
qlr
)
>
37
)
{
qlrlines
.
forEach
((
line
,
index
)
=>
{
let
currentLine
=
''
;
let
arr
=
[];
for
(
let
word
of
line
)
{
const
testLine
=
currentLine
+
word
;
const
lineWidth
=
context
.
measureText
(
testLine
).
width
;
if
(
lineWidth
<=
295
)
{
currentLine
=
testLine
;
}
else
{
arr
.
push
(
currentLine
);
currentLine
=
word
;
}
}
arr
.
push
(
currentLine
);
arr
.
forEach
((
line
,
index
)
=>
{
context
.
fillText
(
line
,
775
,
218
+
(
index
*
20
));
// 调整行高
})
})
}
else
{
qlrlines
.
forEach
((
line
,
index
)
=>
{
let
currentLine
=
''
;
let
arr
=
[];
for
(
let
word
of
line
)
{
const
testLine
=
currentLine
+
word
;
const
lineWidth
=
context
.
measureText
(
testLine
).
width
;
if
(
lineWidth
<=
295
)
{
currentLine
=
testLine
;
}
else
{
arr
.
push
(
currentLine
);
currentLine
=
word
;
}
}
arr
.
push
(
currentLine
);
arr
.
forEach
((
line
,
index
)
=>
{
context
.
fillText
(
line
,
775
,
228
+
(
index
*
20
));
// 调整行高
})
})
}
// 义务人
let
ywrlines
=
this
.
bdcqz
.
ywr
?
this
.
bdcqz
.
ywr
.
split
(
' '
)
:
[];
if
(
getByteLen
(
this
.
bdcqz
.
ywr
)
>
37
)
{
ywrlines
.
forEach
((
line
,
index
)
=>
{
let
currentLine
=
''
;
let
arr
=
[];
for
(
let
word
of
line
)
{
const
testLine
=
currentLine
+
word
;
const
lineWidth
=
context
.
measureText
(
testLine
).
width
;
if
(
lineWidth
<=
295
)
{
currentLine
=
testLine
;
}
else
{
arr
.
push
(
currentLine
);
currentLine
=
word
;
}
}
arr
.
push
(
currentLine
);
arr
.
forEach
((
line
,
index
)
=>
{
context
.
fillText
(
line
,
775
,
265
+
(
index
*
20
));
// 调整行高
})
})
}
else
{
ywrlines
.
forEach
((
line
,
index
)
=>
{
let
currentLine
=
''
;
let
arr
=
[];
for
(
let
word
of
line
)
{
const
testLine
=
currentLine
+
word
;
const
lineWidth
=
context
.
measureText
(
testLine
).
width
;
if
(
lineWidth
<=
295
)
{
currentLine
=
testLine
;
}
else
{
arr
.
push
(
currentLine
);
currentLine
=
word
;
}
}
arr
.
push
(
currentLine
);
arr
.
forEach
((
line
,
index
)
=>
{
context
.
fillText
(
line
,
775
,
275
+
(
index
*
20
));
// 调整行高
})
})
}
let
lines2
=
this
.
bdcqz
.
zl
?
this
.
bdcqz
.
zl
.
split
(
' '
)
:
[];
if
(
getByteLen
(
this
.
bdcqz
.
zl
)
>
=
39
)
{
if
(
getByteLen
(
this
.
bdcqz
.
zl
)
>
37
)
{
lines2
.
forEach
((
line
,
index
)
=>
{
const
y
=
315
+
(
index
*
20
);
// 每行文本的垂直位置
let
currentLine
=
''
;
...
...
@@ -558,7 +644,14 @@
// bdcdyh
this
.
bdcdyh
=
this
.
bdcqz
.
bdcdyh
.
slice
(
0
,
6
)
+
' '
+
this
.
bdcqz
.
bdcdyh
.
slice
(
6
,
12
)
+
' '
+
this
.
bdcqz
.
bdcdyh
.
slice
(
12
,
19
)
+
' '
+
this
.
bdcqz
.
bdcdyh
.
slice
(
19
,
this
.
bdcqz
.
bdcdyh
.
length
)
// 保存当前字体设置
const
originalFont
=
context
.
font
;
// 设置新的字体大小
context
.
font
=
'16px 楷体'
;
// 替换为你想要的字体和大小
// 绘制 bdcdyh
context
.
fillText
(
this
.
bdcdyh
?
this
.
bdcdyh
:
''
,
775
,
373
);
// 恢复原始字体设置
context
.
font
=
originalFont
;
// qlqtzk
const
maxWidth
=
290
;
// 最大宽度限制
let
lines
=
this
.
bdcqz
.
qlqtzk
?
this
.
bdcqz
.
qlqtzk
.
split
(
'\n'
).
filter
(
i
=>
i
&&
i
.
trim
())
:
[];
...
...
@@ -581,18 +674,18 @@
arr
.
push
(
currentLine
);
if
(
i
>
0
)
{
arr
.
forEach
((
line
,
index
)
=>
{
context
.
fillText
(
line
,
770
,
438
+
(
2
3
*
(
i
-
1
))
+
5
*
num
+
(
index
*
16
));
// 调整行高
context
.
fillText
(
line
,
770
,
438
+
(
2
4
*
(
i
-
1
))
+
5
*
num
+
(
index
*
17
));
// 调整行高
})
}
else
{
arr
.
forEach
((
line
,
index
)
=>
{
context
.
fillText
(
line
,
770
,
438
+
(
2
3
*
(
i
-
1
))
+
(
index
*
16
));
// 调整行高
context
.
fillText
(
line
,
770
,
438
+
(
2
4
*
(
i
-
1
))
+
(
index
*
17
));
// 调整行高
})
}
}
else
{
if
(
i
>
0
)
{
context
.
fillText
(
lines
[
i
]
?
lines
[
i
]
:
''
,
770
,
447
+
6
*
num
+
(
2
3
*
(
i
-
1
)));
context
.
fillText
(
lines
[
i
]
?
lines
[
i
]
:
''
,
770
,
447
+
6
*
num
+
(
2
5
*
(
i
-
1
)));
}
else
{
context
.
fillText
(
lines
[
i
]
?
lines
[
i
]
:
''
,
770
,
447
+
(
2
3
*
(
i
-
1
)));
context
.
fillText
(
lines
[
i
]
?
lines
[
i
]
:
''
,
770
,
447
+
(
2
5
*
(
i
-
1
)));
}
}
}
...
...
src/views/workflow/components/dialog/zsyl.vue
View file @
ca12446
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2024-01-17
09:35:40
* @LastEditTime: 2024-01-17
10:32:29
-->
<
template
>
<div
class=
"from-clues loadingtext"
v-Loading=
"loading"
element-loading-text=
"拼命加载中..."
style=
"text-align: center;"
>
...
...
@@ -438,7 +438,7 @@
context
.
fillText
(
this
.
bdcqz
.
sxh
?
this
.
bdcqz
.
sxh
:
''
,
960
,
123
);
context
.
fillText
(
this
.
bdcqz
.
zmqlhsx
?
this
.
bdcqz
.
zmqlhsx
:
''
,
775
,
180
);
// context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 775, 228);
// 权利人
let
qlrlines
=
this
.
bdcqz
.
qlr
?
this
.
bdcqz
.
qlr
.
split
(
' '
)
:
[];
if
(
getByteLen
(
this
.
bdcqz
.
qlr
)
>
37
)
{
qlrlines
.
forEach
((
line
,
index
)
=>
{
...
...
@@ -568,11 +568,18 @@
})
}
// bdcdyh
this
.
bdcdyh
=
this
.
bdcqz
.
bdcdyh
.
slice
(
0
,
6
)
+
' '
+
this
.
bdcqz
.
bdcdyh
.
slice
(
6
,
12
)
+
' '
+
this
.
bdcqz
.
bdcdyh
.
slice
(
12
,
19
)
+
' '
+
this
.
bdcqz
.
bdcdyh
.
slice
(
19
,
this
.
bdcqz
.
bdcdyh
.
length
)
// context.fillText(this.bdcdyh ? this.bdcdyh : '', 775, 373);
// 保存当前字体设置
const
originalFont
=
context
.
font
;
// 设置新的字体大小
context
.
font
=
'16px 楷体'
;
// 替换为你想要的字体和大小
// 绘制 bdcdyh
context
.
fillText
(
this
.
bdcdyh
?
this
.
bdcdyh
:
''
,
775
,
373
);
// 恢复原始字体设置
context
.
font
=
originalFont
;
// qlqtzk
const
maxWidth
=
295
;
// 最大宽度限制
let
lines
=
this
.
bdcqz
.
qlqtzk
?
this
.
bdcqz
.
qlqtzk
.
split
(
'\n'
).
filter
(
i
=>
i
&&
i
.
trim
())
:
[];
...
...
@@ -594,18 +601,18 @@
arr
.
push
(
currentLine
);
if
(
i
>
0
)
{
arr
.
forEach
((
line
,
index
)
=>
{
context
.
fillText
(
line
,
770
,
4
28
+
(
25
*
(
i
-
1
))
+
5
*
num
+
(
index
*
15
));
// 调整行高
context
.
fillText
(
line
,
770
,
4
38
+
(
24
*
(
i
-
1
))
+
5
*
num
+
(
index
*
17
));
// 调整行高
})
}
else
{
arr
.
forEach
((
line
,
index
)
=>
{
context
.
fillText
(
line
,
770
,
43
5
+
(
25
*
(
i
-
1
))
+
(
index
*
14
));
// 调整行高
context
.
fillText
(
line
,
770
,
43
8
+
(
24
*
(
i
-
1
))
+
(
index
*
17
));
// 调整行高
})
}
}
else
{
if
(
i
>
0
)
{
context
.
fillText
(
lines
[
i
]
?
lines
[
i
]
:
''
,
770
,
44
0
+
5
*
num
+
(
24
*
(
i
-
1
)));
context
.
fillText
(
lines
[
i
]
?
lines
[
i
]
:
''
,
770
,
44
7
+
6
*
num
+
(
25
*
(
i
-
1
)));
}
else
{
context
.
fillText
(
lines
[
i
]
?
lines
[
i
]
:
''
,
770
,
44
0
+
(
24
*
(
i
-
1
)));
context
.
fillText
(
lines
[
i
]
?
lines
[
i
]
:
''
,
770
,
44
7
+
(
25
*
(
i
-
1
)));
}
}
}
...
...
Please
register
or
sign in
to post a comment