Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bms-vue-obear
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
daywrite
bms-vue-obear
Commits
0693e8ae
Commit
0693e8ae
authored
May 16, 2019
by
daywrite
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
考勤记录检查完成,剩余2个问题
parent
4e28794e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
100 additions
and
1 deletion
+100
-1
punchList.vue
src/components/punch/punchList.vue
+34
-0
punchView.vue
src/components/punch/punchView.vue
+46
-0
punchItem.vue
src/components/punch_list/punchItem.vue
+11
-1
punch.js
src/routes/punch.js
+9
-0
No files found.
src/components/punch/punchList.vue
0 → 100644
View file @
0693e8ae
<
template
>
<section>
<table
class=
"table table-stripede table-bordered"
>
<thead>
<tr><th>
名称
</th><th>
内容
</th></tr>
</thead>
<tbody>
<tr><td>
日期
</td><td>
{{
model
.
date_display
}}
</td></tr>
<tr><td>
考勤人
</td><td>
{{
model
.
user
&&
model
.
user
.
name
}}
</td></tr>
<tr><td>
签到时间
</td><td>
{{
model
.
in_status_display
}}
</td></tr>
<tr><td>
签到说明
</td><td>
{{
model
.
in_description
?
model
.
in_description
:
'(未设置)'
}}
</td></tr>
<tr><td>
签退时间
</td><td>
{{
model
.
out_status_display
}}
</td></tr>
<tr><td>
签退说明
</td><td>
{{
model
.
out_description
?
model
.
out_description
:
'(未设置)'
}}
</td></tr>
<tr><td>
图片
</td><td>
(未设置)
</td></tr>
</tbody>
</table>
</section>
</
template
>
<
script
>
export
default
{
name
:
'punchList'
,
props
:
[
'model'
]
}
</
script
>
<
style
scoped
>
table
thead
{
background
:
white
;
}
table
tr
:nth-child
(
odd
)
{
background
:
#6c757d
;
background-color
:
rgba
(
0
,
0
,
0
,
.05
);
}
</
style
>
src/components/punch/punchView.vue
0 → 100644
View file @
0693e8ae
<
template
>
<section>
<el-row
:gutter=
"10"
class=
"header-title"
>
<el-col
:span=
"6"
>
<h2>
查看考勤
</h2>
</el-col>
</el-row>
<div
class=
"page-body-content"
>
<list
:model=
"model"
></list>
</div>
</section>
</
template
>
<
script
>
import
list
from
'./punchList'
import
{
requestAPI
,
api
}
from
'@/lib/commonMixin'
export
default
{
data
()
{
return
{
model
:
{}
}
},
components
:
{
list
},
created
()
{
let
id
=
this
.
$route
.
query
.
id
||
this
.
$route
.
params
.
id
this
.
getList
(
id
)
},
methods
:
{
getList
(
id
)
{
requestAPI
(
api
.
getpunchEdit
,
{
id
}).
then
((
res
)
=>
{
this
.
model
=
res
.
model
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
src/components/punch_list/punchItem.vue
View file @
0693e8ae
...
@@ -4,7 +4,13 @@
...
@@ -4,7 +4,13 @@
<el-col
:span=
"4"
:xs=
"24"
class=
"obear-schedule-left"
:style=
"
{background: item.bgcolor}">
<el-col
:span=
"4"
:xs=
"24"
class=
"obear-schedule-left"
:style=
"
{background: item.bgcolor}">
<el-row
:gutter=
"10"
>
<el-row
:gutter=
"10"
>
<el-col
:span=
"24"
>
<el-col
:span=
"24"
>
<i
class=
"fa fa-fw fa-calendar-check-o"
aria-hidden=
"true"
></i>
{{
item
.
edate
}}
{{
item
.
week
}}
<i
class=
"fa fa-fw fa-calendar-check-o"
aria-hidden=
"true"
></i>
<router-link
:to=
"
{ path: '/view/' + item.id }" v-if="id_isNumber">
{{
item
.
edate
}}
</router-link>
<router-link
:to=
"
{ path: '/view?id=' + item.id }" v-if="!id_isNumber">
{{
item
.
edate
}}
</router-link>
{{
item
.
week
}}
</el-col>
</el-col>
<el-col
:span=
"24"
style=
"padding-left: 3px;"
>
<el-col
:span=
"24"
style=
"padding-left: 3px;"
>
<span>
<span>
...
@@ -85,6 +91,10 @@ export default {
...
@@ -85,6 +91,10 @@ export default {
in_out_status
()
{
in_out_status
()
{
return
!!
this
.
item
.
in_at
&&
!!
this
.
item
.
out_at
return
!!
this
.
item
.
in_at
&&
!!
this
.
item
.
out_at
},
id_isNumber
()
{
return
!
isNaN
(
this
.
item
.
id
)
}
}
},
},
...
...
src/routes/punch.js
View file @
0693e8ae
import
PunchHome
from
'../components/punch_list/punchHome'
import
PunchHome
from
'../components/punch_list/punchHome'
import
PunchView
from
'../components/punch/PunchView'
const
routes
=
[{
const
routes
=
[{
path
:
'/punch'
,
path
:
'/punch'
,
name
:
'punchHome'
,
name
:
'punchHome'
,
component
:
PunchHome
component
:
PunchHome
},
{
path
:
'/view'
,
name
:
'punchView1'
,
component
:
PunchView
},
{
path
:
'/view/:id'
,
name
:
'punchView2'
,
component
:
PunchView
}]
}]
export
default
routes
export
default
routes
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