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
86c4657a
authored
2023-10-25 13:52:15 +0800
by
renchao@pashanhoo.com
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'dev'
2 parents
89819994
106ec41a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
20 deletions
src/views/workflow/components/dialog/zsdy.vue
src/views/workflow/components/dialog/zsyl.vue
src/views/workflow/components/dialog/zsdy.vue
View file @
86c4657
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-
09-06 15:32:50
* @LastEditTime: 2023-
10-25 13:49:56
-->
<
template
>
<div>
...
...
@@ -67,6 +67,7 @@
import
{
getPrintTemplateByCode
}
from
"@/api/print"
;
import
{
getLodop
}
from
"@/utils/LodopFuncs"
import
{
readYsxlh
,
certificate
,
getBdcqzDetail
,
invalidCertificate
}
from
"@/api/bdcqz.js"
;
import
{
log
}
from
'bpmn-js-token-simulation'
;
export
default
{
props
:
{
formData
:
{
...
...
@@ -239,7 +240,7 @@
context
.
fillText
(
this
.
bdcqz
.
qlxz
?
this
.
bdcqz
.
qlxz
:
''
,
129
,
303
);
context
.
fillText
(
this
.
bdcqz
.
yt
?
this
.
bdcqz
.
yt
:
''
,
129
,
346
);
let
lines6
=
this
.
bdcqz
.
mj
?
this
.
bdcqz
.
mj
.
split
(
' '
)
:
[];
if
(
getByteLen
(
this
.
bdcqz
.
mj
)
>
41
)
{
if
(
getByteLen
(
this
.
bdcqz
.
mj
)
>
37
)
{
lines6
.
forEach
((
line
,
index
)
=>
{
const
y
=
378
+
(
index
*
27
);
// 每行文本的垂直位置
let
currentLine
=
''
;
...
...
@@ -247,7 +248,7 @@
for
(
let
word
of
line
)
{
const
testLine
=
currentLine
+
word
;
const
lineWidth
=
context
.
measureText
(
testLine
).
width
;
if
(
lineWidth
<=
33
0
)
{
if
(
lineWidth
<=
33
6
)
{
currentLine
=
testLine
;
}
else
{
arr
.
push
(
currentLine
);
...
...
@@ -267,7 +268,7 @@
for
(
let
word
of
line
)
{
const
testLine
=
currentLine
+
word
;
const
lineWidth
=
context
.
measureText
(
testLine
).
width
;
if
(
lineWidth
<=
33
0
)
{
if
(
lineWidth
<=
33
6
)
{
currentLine
=
testLine
;
}
else
{
arr
.
push
(
currentLine
);
...
...
@@ -284,8 +285,8 @@
const
maxWidth
=
332
;
// 最大宽度限制
let
lines
=
this
.
bdcqz
.
qlqtzk
?
this
.
bdcqz
.
qlqtzk
.
split
(
'\n'
)
:
[];
for
(
let
i
=
0
;
i
<
lines
.
length
;
i
++
)
{
let
num
=
Math
.
ceil
(
getByteLen
(
lines
[
i
])
/
41
)
if
(
getByteLen
(
lines
[
i
])
>
41
)
{
let
num
=
Math
.
ceil
(
getByteLen
(
lines
[
i
])
/
37
)
if
(
getByteLen
(
lines
[
i
])
>
37
)
{
let
currentLine
=
''
;
let
arr
=
[];
for
(
let
word
of
lines
[
i
])
{
...
...
@@ -301,18 +302,18 @@
arr
.
push
(
currentLine
);
if
(
i
>
0
)
{
arr
.
forEach
((
line
,
index
)
=>
{
context
.
fillText
(
line
,
129
,
48
0
+
(
26
*
(
i
-
1
))
+
5
*
num
+
(
index
*
13
));
// 调整行高
context
.
fillText
(
line
,
129
,
48
5
+
(
26
*
(
i
-
1
))
+
5
*
num
+
(
index
*
15
));
// 调整行高
})
}
else
{
arr
.
forEach
((
line
,
index
)
=>
{
context
.
fillText
(
line
,
129
,
4
80
+
(
26
*
(
i
-
1
))
+
(
index
*
13
));
// 调整行高
context
.
fillText
(
line
,
129
,
4
95
+
(
26
*
(
i
-
1
))
+
(
index
*
13
));
// 调整行高
})
}
}
else
{
if
(
i
>
0
)
{
context
.
fillText
(
lines
[
i
]
?
lines
[
i
]
:
''
,
129
,
49
0
+
4
*
num
+
(
24
*
(
i
-
1
)));
context
.
fillText
(
lines
[
i
]
?
lines
[
i
]
:
''
,
129
,
49
5
+
4
*
num
+
(
24
*
(
i
-
1
)));
}
else
{
context
.
fillText
(
lines
[
i
]
?
lines
[
i
]
:
''
,
129
,
49
0
+
(
24
*
(
i
-
1
)));
context
.
fillText
(
lines
[
i
]
?
lines
[
i
]
:
''
,
129
,
50
0
+
(
24
*
(
i
-
1
)));
}
}
}
...
...
@@ -338,7 +339,7 @@
})
})
let
lines3
=
this
.
bdcqz
.
syqx
?
this
.
bdcqz
.
syqx
.
split
(
' '
)
:
[];
if
(
getByteLen
(
this
.
bdcqz
.
syqx
)
>
41
)
{
if
(
getByteLen
(
this
.
bdcqz
.
syqx
)
>
37
)
{
lines3
.
forEach
((
line
,
index
)
=>
{
const
y
=
423
+
(
index
*
27
);
// 每行文本的垂直位置
let
currentLine
=
''
;
...
...
@@ -381,7 +382,7 @@
}
let
lines2
=
this
.
bdcqz
.
zl
?
this
.
bdcqz
.
zl
.
split
(
' '
)
:
[];
if
(
getByteLen
(
this
.
bdcqz
.
zl
)
>
41
)
{
if
(
getByteLen
(
this
.
bdcqz
.
zl
)
>
37
)
{
lines2
.
forEach
((
line
,
index
)
=>
{
const
y
=
170
+
(
index
*
20
);
// 每行文本的垂直位置
let
currentLine
=
''
;
...
...
@@ -469,7 +470,7 @@
// 义务人
context
.
fillText
(
this
.
bdcqz
.
ywr
?
this
.
bdcqz
.
ywr
:
''
,
775
,
275
);
let
lines2
=
this
.
bdcqz
.
zl
?
this
.
bdcqz
.
zl
.
split
(
' '
)
:
[];
if
(
getByteLen
(
this
.
bdcqz
.
zl
)
>
41
)
{
if
(
getByteLen
(
this
.
bdcqz
.
zl
)
>
=
39
)
{
lines2
.
forEach
((
line
,
index
)
=>
{
const
y
=
315
+
(
index
*
20
);
// 每行文本的垂直位置
let
currentLine
=
''
;
...
...
@@ -518,6 +519,7 @@
const
maxWidth
=
290
;
// 最大宽度限制
let
lines
=
this
.
bdcqz
.
qlqtzk
?
this
.
bdcqz
.
qlqtzk
.
split
(
'\n'
)
:
[];
for
(
let
i
=
0
;
i
<
lines
.
length
;
i
++
)
{
console
.
log
(
getByteLen
(
lines
[
i
]));
let
num
=
Math
.
ceil
(
getByteLen
(
lines
[
i
])
/
37
)
if
(
getByteLen
(
lines
[
i
])
>
37
)
{
let
currentLine
=
''
;
...
...
@@ -588,7 +590,6 @@
}
image
.
src
=
this
.
bdczmSrc
;
},
// 打印
/**
* @description: 打印
* @author: renchao
...
...
src/views/workflow/components/dialog/zsyl.vue
View file @
86c4657
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-10-
19 10:00:27
* @LastEditTime: 2023-10-
25 13:50:43
-->
<
template
>
<div
class=
"from-clues loadingtext"
v-Loading=
"loading"
element-loading-text=
"拼命加载中..."
style=
"height:720px;text-align: center;"
>
...
...
@@ -163,7 +163,7 @@
context
.
fillText
(
this
.
bdcqz
.
yt
?
this
.
bdcqz
.
yt
:
''
,
129
,
346
);
// context.fillText(this.bdcqz.mj ? this.bdcqz.mj : '', 129, 386);
let
lines6
=
this
.
bdcqz
.
mj
?
this
.
bdcqz
.
mj
.
split
(
' '
)
:
[];
if
(
getByteLen
(
this
.
bdcqz
.
mj
)
>
41
)
{
if
(
getByteLen
(
this
.
bdcqz
.
mj
)
>
37
)
{
lines6
.
forEach
((
line
,
index
)
=>
{
const
y
=
378
+
(
index
*
27
);
// 每行文本的垂直位置
let
currentLine
=
''
;
...
...
@@ -207,8 +207,8 @@
// 权利其他状态
let
lines
=
this
.
bdcqz
.
qlqtzk
?
this
.
bdcqz
.
qlqtzk
.
split
(
'\n'
)
:
[];
for
(
let
i
=
0
;
i
<
lines
.
length
;
i
++
)
{
let
num
=
Math
.
ceil
(
getByteLen
(
lines
[
i
])
/
3
8
)
if
(
getByteLen
(
lines
[
i
])
>
3
8
)
{
let
num
=
Math
.
ceil
(
getByteLen
(
lines
[
i
])
/
3
7
)
if
(
getByteLen
(
lines
[
i
])
>
3
7
)
{
let
currentLine
=
''
;
let
arr
=
[];
for
(
let
word
of
lines
[
i
])
{
...
...
@@ -261,7 +261,7 @@
})
})
let
lines3
=
this
.
bdcqz
.
syqx
?
this
.
bdcqz
.
syqx
.
split
(
' '
)
:
[];
if
(
getByteLen
(
this
.
bdcqz
.
syqx
)
>
41
)
{
if
(
getByteLen
(
this
.
bdcqz
.
syqx
)
>
37
)
{
lines3
.
forEach
((
line
,
index
)
=>
{
const
y
=
423
+
(
index
*
27
);
// 每行文本的垂直位置
let
currentLine
=
''
;
...
...
@@ -304,7 +304,7 @@
}
let
lines2
=
this
.
bdcqz
.
zl
?
this
.
bdcqz
.
zl
.
split
(
' '
)
:
[];
if
(
getByteLen
(
this
.
bdcqz
.
zl
)
>
41
)
{
if
(
getByteLen
(
this
.
bdcqz
.
zl
)
>
37
)
{
lines2
.
forEach
((
line
,
index
)
=>
{
const
y
=
170
+
(
index
*
20
);
// 每行文本的垂直位置
let
currentLine
=
''
;
...
...
Please
register
or
sign in
to post a comment