Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
CO-OP Search
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kittisak Maneewong
CO-OP Search
Commits
80a07856
Commit
80a07856
authored
Apr 16, 2019
by
Kittisak Maneewong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Edit pic add job
parent
7784427b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
3 deletions
+56
-3
app.js
public/js/app.js
+0
-0
Addjob.vue
resources/js/views/Addjob.vue
+56
-3
No files found.
public/js/app.js
View file @
80a07856
This source diff could not be displayed because it is too large. You can
view the blob
instead.
resources/js/views/Addjob.vue
View file @
80a07856
<
template
>
<div>
<v-layout
row
wrap
class=
"border-div pa-0 my-3"
>
<v-flex
xs12
sm12
class=
"pa-3"
>
<h2
class=
"font-weight-bold red--text"
>
ข้อมูลบริษัท
</h2>
</v-flex>
<form
enctype=
"multipart/form-data"
>
<v-flex
sm12
>
<v-layout
row
wrap
class=
"borderbottom pa-3"
>
<v-flex
sm3
xs12
>
<v-layout
align-center
justify-center
fill-height
>
<img
src=
"https://asianinteriorservices.com/wp-content/uploads/2018/04/noImg.png"
alt=
""
width=
"180"
>
<input
type=
"file"
accept=
"image/*"
class=
"input-file"
ref=
"inputFile"
@
change=
"selectFile"
>
<v-tooltip
right
>
<template
v-slot:activator=
"
{ on }">
<img
v-on=
"on"
class=
"img"
@
click=
"$refs.inputFile.click()"
:src=
"srcImage"
alt=
""
width=
"180"
>
</
template
>
<span>
{{ status }}
</span>
</v-tooltip>
</v-layout>
</v-flex>
<v-flex
sm9
xs12
>
...
...
@@ -178,12 +184,50 @@
<v-btn
color=
"red accent-4"
dark
>
บันทึกข้อมูล
</v-btn>
</v-layout>
</v-layout>
</v-flex>
</form>
</v-layout>
</div>
</template>
<
script
>
export
default
{
data
()
{
return
{
status
:
'ยังไม่ได้เลือกไฟล์'
,
srcImage
:
'https://asianinteriorservices.com/wp-content/uploads/2018/04/noImg.png'
}
},
methods
:
{
selectFile
(
e
)
{
const
file
=
e
.
target
.
files
if
(
!
file
.
length
)
{
return
}
this
.
status
=
file
[
0
].
name
this
.
showImage
(
file
[
0
])
this
.
getBlob
(
file
[
0
],
file
[
0
].
type
)
},
showImage
(
file
)
{
const
reader
=
new
FileReader
()
reader
.
onload
=
e
=>
{
this
.
srcImage
=
e
.
target
.
result
}
reader
.
readAsDataURL
(
file
)
},
getBlob
(
file
,
type
)
{
const
reader
=
new
FileReader
()
reader
.
onloadend
=
e
=>
{
let
imgBlob
=
new
Blob
([
e
.
target
.
result
],
{
type
:
type
})
console
.
log
(
imgBlob
)
}
reader
.
readAsArrayBuffer
(
file
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.detail
{
color
:
#276f86
;
...
...
@@ -293,5 +337,14 @@
display
:
block
;
width
:
100%
;
}
.img
{
cursor
:
pointer
;
border
:
1px
solid
;
}
.input-file
{
display
:
none
;
}
</
style
>
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