Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
罗超
SuperMan
Commits
87bdc8b2
Commit
87bdc8b2
authored
Jun 15, 2023
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
ff7ae6a7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
16 deletions
+20
-16
addPassenger.vue
src/components/SalesModule/addPassenger.vue
+18
-3
index.js
src/plug/index.js
+2
-13
No files found.
src/components/SalesModule/addPassenger.vue
View file @
87bdc8b2
...
...
@@ -439,11 +439,11 @@
</div>
<div
class=
"contPic"
>
<div
class=
"contPicNav"
>
<li
@
click=
"templateType=1"
:class=
"
{active:templateType==1}">
<li
@
click=
"templateType=1
,changeType()
"
:class=
"
{active:templateType==1}">
身份证
<div
v-show=
"templateType==1"
></div>
</li>
<li
@
click=
"templateType=2"
:class=
"
{active:templateType==2}">
<li
@
click=
"templateType=2
,changeType()
"
:class=
"
{active:templateType==2}">
护照
<div
v-show=
"templateType==2"
></div>
</li>
...
...
@@ -467,7 +467,7 @@
</label>
</div>
<input
type=
"button"
value=
"开始识别"
class=
"normalBtn"
@
click=
"commonTextDiscern"
/>
<br/>
<br
/>
<span
style=
"color:red;font-weight:bold"
>
请认真核对识别结果,如有不正确的请手动调整。
</span>
</div>
</div>
...
...
@@ -967,6 +967,10 @@
},
//OCR识别
commonTextDiscern
()
{
if
(
this
.
imgBase64String
==
''
)
{
this
.
Error
(
"请选择图片!"
);
return
;
}
let
params
=
{
base64
:
""
,
Type
:
1
,
//1-中国大陆护照,2-身份证
...
...
@@ -1043,8 +1047,18 @@
}
}
}
},
faild
=>
{
this
.
loading
=
false
;
});
},
//识别类型切换
changeType
()
{
let
preview
=
document
.
getElementById
(
"img"
);
preview
.
src
=
""
;
this
.
imgBase64String
=
''
;
let
file
=
document
.
getElementById
(
"file"
);
file
.
value
=
''
;
},
onUpload
(
val
)
{
let
preview
=
document
.
getElementById
(
"img"
);
let
file
=
document
.
getElementById
(
"file"
).
files
[
0
];
...
...
@@ -1061,6 +1075,7 @@
quality
:
0.7
}).
then
(
res
=>
{
this
.
imgBase64String
=
res
.
base64
.
slice
(
23
);
this
.
commonTextDiscern
();
});
},
goBack
()
{
...
...
src/plug/index.js
View file @
87bdc8b2
...
...
@@ -1028,7 +1028,7 @@ export default {
if
(
successCall
)
{
successCall
(
res
)
}
})
}
,
faildCall
)
},
//Blob文件上传
Vue
.
prototype
.
uploadSelfBlob
=
function
(
path
,
files
,
successCall
)
{
...
...
@@ -1141,18 +1141,7 @@ export default {
var
newpath
=
path
.
replace
(
'http://192.168.10.214:8130'
,
''
).
replace
(
'https://imgfile.oytour.com'
,
''
).
replace
(
'https://imgfile.oytour.com'
,
''
).
split
(
'?'
)[
0
];
return
url
+
'/image/index?filePath='
+
newpath
+
'&process=resize,'
+
poise
+
',w_'
+
w
+
',h_'
+
h
;
}
Vue
.
prototype
.
uploadSelfBlob
=
function
(
path
,
files
,
successCall
)
{
let
that
=
this
;
var
uploadUrl
=
that
.
domainManager
().
UploadUrl
+
"/Upload/UploadBlob?fileType=1&fileLimit=5&&filePath="
+
path
;
var
formData
=
new
FormData
();
formData
.
append
(
"myfile"
,
files
[
0
]);
that
.
$http
.
post
(
uploadUrl
,
formData
,
{
'Content-Type'
:
'multipart/form-data'
})
.
then
(
res
=>
{
successCall
(
res
);
})
},
//验证只能输入2位小数【负数:isMinus传true】
Vue
.
prototype
.
checkPrice
=
function
(
item
,
filed
,
isMinus
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment