Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
founder_vue
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
常超
founder_vue
Commits
bfff4bb9
Commit
bfff4bb9
authored
Nov 23, 2021
by
叶富雄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
指定字符需要base64
parent
1beb1254
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
20 deletions
+51
-20
src/views/dswtz/hmxx/addHmxx.vue
+51
-20
No files found.
src/views/dswtz/hmxx/addHmxx.vue
View file @
bfff4bb9
...
...
@@ -5,9 +5,12 @@
:formLabelAligns=
"formLabelAlign"
@
submit=
"submit"
:propTitle=
"title"
@
handleRemove=
"handleRemove
"
@
removePhoto=
"removePhoto
"
pageBs=
"addsqfbzl"
ref=
"formCompontent"
:base64Transform=
"true"
:fileBase64=
"fileBase64"
@
onBase64Transform=
"onBase64Transform"
>
</form-compontent>
</div>
...
...
@@ -16,10 +19,7 @@
<
script
>
import
formCompontent
from
"@c/form.vue"
;
import
{
updateHm
}
from
"@/api/dswtz/hmxx.js"
;
import
{
selectDnaList
}
from
"@/api/dswtz/dnaxx.js"
;
import
{
updateHm
,
selectHmzpList
}
from
"@/api/dswtz/hmxx.js"
;
export
default
{
name
:
"addryxx"
,
components
:
{
...
...
@@ -27,6 +27,10 @@
},
data
()
{
return
{
fileBase64
:{
hmsjLeft
:
""
,
hmsjRight
:
""
},
title
:
"新增虹膜信息"
,
propFormField
:
[
{
...
...
@@ -54,7 +58,7 @@
{
name
:
"左虹膜:"
,
id
:
"hmsjLeft"
,
type
:
"
file
"
,
type
:
"
photo
"
,
value
:
""
,
placeholder
:
"请输入"
,
col
:
"22"
,
...
...
@@ -62,7 +66,7 @@
{
name
:
"右虹膜:"
,
id
:
"hmsjRight"
,
type
:
"
file
"
,
type
:
"
photo
"
,
value
:
""
,
placeholder
:
"请输入"
,
col
:
"22"
,
...
...
@@ -70,7 +74,11 @@
],
},
],
formLabelAlign
:
{},
formLabelAlign
:
{
xm
:
''
,
gmsfhm
:
''
,
hmsjLeft
:
''
,
hmsjRight
:
''
},
type
:
""
,
xxzjbh
:
""
,
result
:
""
,
...
...
@@ -78,13 +86,27 @@
};
},
methods
:
{
onBase64Transform
(
p
){
this
.
fileBase64
=
p
},
removePhoto
(
item
)
{
let
loading
=
this
.
$loading
({
lock
:
true
,
text
:
"正在删除..."
,
spinner
:
"el-icon-loading"
,
background
:
"rgba(255, 255, 255, 0.7)"
,
});
let
id
=
item
.
id
this
.
$set
(
this
.
formLabelAlign
,
id
,
''
);
loading
.
close
();
},
submit
(
params
)
{
params
.
append
(
'rybh'
,
this
.
rybh
)
params
.
set
(
'hmsjLeft'
,
this
.
fileBase64
[
'hmsjLeft'
])
params
.
set
(
'hmsjRight'
,
this
.
fileBase64
[
'hmsjRight'
])
updateHm
(
params
)
},
handleRemove
(
val
)
{
console
.
log
(
val
);
this
.
removeFileXxzjbh
.
push
(
val
.
xxzjbh
);
},
getshuju
()
{
...
...
@@ -98,19 +120,28 @@
let
params
=
new
FormData
();
params
.
append
(
"rybh"
,
this
.
rybh
);
selectDnaList
(
params
).
then
((
res
)
=>
{
var
result
=
res
.
data
.
rows
;
this
.
result
=
result
;
self
.
propFormField
.
forEach
((
fieldItem
)
=>
{
if
(
fieldItem
.
data
&&
fieldItem
.
data
.
length
>
0
)
{
fieldItem
.
data
.
forEach
((
i
)
=>
{
this
.
$set
(
this
.
formLabelAlign
,
i
.
id
,
result
[
i
.
id
]);
});
selectHmzpList
(
params
).
then
((
res
)
=>
{
var
result
=
res
.
data
.
rows
[
0
];
if
(
res
.
data
.
rows
.
length
){
this
.
$set
(
this
.
formLabelAlign
,
'xm'
,
res
.
data
.
rows
[
0
][
'xm'
]);
this
.
$set
(
this
.
formLabelAlign
,
'gmsfhm'
,
res
.
data
.
rows
[
0
][
'gmsfhm'
]);
for
(
let
h
of
res
.
data
.
rows
.
values
()){
let
hmywdm
=
h
.
hmywdm
;
let
tg
=
"data:image/jpeg;base64,"
+
h
.
hmsj
if
(
hmywdm
===
'0'
){
this
.
$set
(
this
.
formLabelAlign
,
'hmsjLeft'
,
tg
);
}
this
.
$forceUpdate
();
});
else
{
this
.
$set
(
this
.
formLabelAlign
,
'hmsjRight'
,
tg
);
}
}
}
if
(
res
.
data
.
rows
.
length
){
this
.
result
=
result
;
self
.
$set
(
self
.
formLabelAlign
,
"editing"
,
true
);
self
.
$forceUpdate
();
}
setTimeout
(()
=>
{
loading
.
close
();
},
500
);
...
...
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