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
0e66507b
Commit
0e66507b
authored
Apr 19, 2019
by
Kittisak Maneewong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make picture map
parent
ce03f845
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
app.js
public/js/app.js
+0
-0
Addjob.vue
resources/js/views/Addjob.vue
+19
-1
No files found.
public/js/app.js
View file @
0e66507b
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 @
0e66507b
...
...
@@ -12,7 +12,10 @@
<input
type=
"file"
accept=
"image/*"
class=
"input-file"
ref=
"inputFile"
@
change=
"selectFile"
>
<v-tooltip
right
>
<template
v-slot:activator=
"
{ on }">
<v-layout
column
align-center
>
<img
v-on=
"on"
class=
"img"
@
click=
"$refs.inputFile.click()"
:src=
"srcImage"
alt=
""
width=
"200"
>
<v-btn
color=
"error"
v-if=
"srcImage !== 'https://asianinteriorservices.com/wp-content/uploads/2018/04/noImg.png'"
@
click=
"srcImage = 'https://asianinteriorservices.com/wp-content/uploads/2018/04/noImg.png'"
>
ลบรูปภาพ
</v-btn>
</v-layout>
</
template
>
<span>
{{ status }}
</span>
</v-tooltip>
...
...
@@ -131,7 +134,10 @@
<label>
รูปภาพแผนที่
</label>
</v-flex>
<v-flex
sm12
xs12
>
<v-btn
color=
"deep-orange darken-4"
class=
"px-2"
small
outline
><v-icon>
file_copy
</v-icon>
เลือกไฟล์
</v-btn>
<input
type=
"file"
accept=
"image/*"
class=
"input-file"
ref=
"inputFileMap"
@
change=
"selectFileMap"
>
<v-btn
color=
"deep-orange darken-4"
class=
"px-2"
small
outline
@
click=
"$refs.inputFileMap.click()"
><v-icon>
file_copy
</v-icon>
เลือกไฟล์
</v-btn>
<v-btn
color=
"error"
v-if=
"srcImageMap"
@
click=
"srcImageMap = null"
>
ลบรูปภาพ
</v-btn>
<img
:src=
"srcImageMap"
alt=
""
>
</v-flex>
<v-flex
sm12
xs12
>
<v-text-field
...
...
@@ -363,6 +369,7 @@ export default {
return
{
status
:
'ยังไม่ได้เลือกไฟล์'
,
srcImage
:
'https://asianinteriorservices.com/wp-content/uploads/2018/04/noImg.png'
,
srcImageMap
:
null
,
rules
:
{
required
:
v
=>
!!
v
||
'จำเป็นต้องกรอก'
,
email
:
v
=>
/^
(([^
<>()[
\]\\
.,;:
\s
@"
]
+
(\.[^
<>()[
\]\\
.,;:
\s
@"
]
+
)
*
)
|
(
".+"
))
@
((\[[
0-9
]{1,3}\.[
0-9
]{1,3}\.[
0-9
]{1,3}\.[
0-9
]{1,3}
]
)
|
(([
a-zA-Z
\-
0-9
]
+
\.)
+
[
a-zA-Z
]{2,}))
$/
.
test
(
v
)
||
'รูปแบบอีเมลล์ไม่ถูกต้อง'
...
...
@@ -477,6 +484,17 @@ export default {
this
.
srcImage
=
e
.
target
.
result
}
},
selectFileMap
(
e
)
{
const
file
=
e
.
target
.
files
if
(
!
file
.
length
)
{
return
}
const
fileReader
=
new
FileReader
()
fileReader
.
readAsDataURL
(
file
[
0
])
fileReader
.
onload
=
e
=>
{
this
.
srcImageMap
=
e
.
target
.
result
}
},
createJob
()
{
if
(
this
.
amphoes
.
findIndex
(
x
=>
x
.
amphoe_code
===
this
.
amphoe
.
amphoe_code
)
===
-
1
)
{
this
.
amphoe
=
''
}
if
(
this
.
tumbons
.
findIndex
(
x
=>
x
.
tumbon_code
===
this
.
tumbon
.
tumbon_code
)
===
-
1
)
{
this
.
tumbon
=
''
}
...
...
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