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
84bb5b5a
authored
2023-06-14 13:26:27 +0800
by
tianhaohao@pashanhoo.com
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'dev' of
http://yun.pashanhoo.com:9090/bdc/bdcdj-web
into dev
2 parents
6ac10c45
700ded5f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
8 deletions
src/api/clxx.js
src/views/components/imagePreview.vue
src/views/workflow/components/qlrCommonTable.vue
src/api/clxx.js
View file @
84bb5b5
...
...
@@ -67,6 +67,9 @@ export function uploadSjClmx (data) {
return
request
({
url
:
SERVER
.
SERVERAPI
+
'/rest/ywbl/clxx/uploadSjClmx'
,
method
:
'post'
,
headers
:
{
'Content-Type'
:
'multipart/form-data'
},
data
})
}
...
...
src/views/components/imagePreview.vue
View file @
84bb5b5
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-06-14
09:25:12
* @LastEditTime: 2023-06-14
11:10:26
-->
<
template
>
<div
class=
"rlPopup"
>
...
...
@@ -127,6 +127,29 @@
* @author: renchao
*/
handleViewScan
()
{
function
dataURLtoBlob
(
base64String
)
{
const
arr
=
base64String
.
split
(
','
);
if
(
arr
.
length
!==
2
)
{
throw
new
Error
(
'Invalid Base64 format'
);
}
const
mime
=
arr
[
0
].
match
(
/:
(
.*
?)
;/
)[
1
];
if
(
!
mime
)
{
throw
new
Error
(
'Cannot retrieve MIME type'
);
}
const
bstr
=
atob
(
arr
[
1
]);
const
n
=
bstr
.
length
;
const
u8arr
=
new
Uint8Array
(
n
);
for
(
let
i
=
0
;
i
<
n
;
i
++
)
{
u8arr
[
i
]
=
bstr
.
charCodeAt
(
i
);
}
return
new
Blob
([
u8arr
],
{
type
:
mime
});
}
function
blobToFile
(
blob
)
{
const
options
=
{
type
:
blob
.
type
};
const
file
=
new
File
([
blob
],
options
);
return
file
;
}
let
data
=
{
"filepath"
:
"base64"
,
"rotate"
:
"0"
,
...
...
@@ -136,7 +159,21 @@
"quality"
:
"3"
}
axios
.
post
(
"http://127.0.0.1:38088/video=grabimage"
,
JSON
.
stringify
(
data
)).
then
((
res
)
=>
{
console
.
log
(
res
.
data
);
let
blob
=
dataURLtoBlob
(
'data:image/png;base64,'
+
res
.
data
.
photoBase64
);
let
file
=
blobToFile
(
blob
);
var
formData
=
new
FormData
();
formData
.
append
(
'file'
,
file
.
raw
)
formData
.
append
(
"bsmSj"
,
this
.
previewImg
.
bsmSj
);
formData
.
append
(
"bsmSlsq"
,
this
.
previewImg
.
bsmSlsq
);
uploadSjClmx
(
formData
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
this
.
$emit
(
'updateList'
,
res
.
result
)
this
.
$message
({
message
:
'上传成功!'
,
type
:
'success'
})
}
})
})
},
prev
()
{
...
...
@@ -189,8 +226,6 @@
this
.
$refs
.
upload
.
clearFiles
();
setTimeout
(()
=>
{
if
(
length
!==
this
.
maxLength
)
return
console
.
log
(
files
);
// let data = _.cloneDeep(this.previewImg.imgList[this.previewImg.index])
var
formData
=
new
FormData
();
files
.
forEach
(
file
=>
{
formData
.
append
(
'file'
,
file
.
raw
)
...
...
@@ -204,10 +239,9 @@
message
:
'上传成功!'
,
type
:
'success'
})
}
})
})
}
,
0
)
},
handleDelete
()
{
let
that
=
this
...
...
src/views/workflow/components/qlrCommonTable.vue
View file @
84bb5b5
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-06-14 09:
01:30
* @LastEditTime: 2023-06-14 09:
47:38
-->
<
template
>
<div>
...
...
@@ -201,8 +201,11 @@
if
(
res
.
data
.
code
==
0
)
{
let
data
=
res
.
data
.
IDCardInfo
row
.
sqrmc
=
data
.
name
row
.
zjzl
=
1
row
.
zjzl
=
'1'
row
.
zjh
=
data
.
cardID
row
.
xb
=
data
.
sexCode
row
.
txdz
=
data
.
address
row
.
fzjg
=
data
.
issueOrgan
this
.
$message
({
message
:
'读取成功!'
,
type
:
'success'
...
...
Please
register
or
sign in
to post a comment