Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
W
work-log
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
高宇
work-log
Commits
9f17d823
Commit
9f17d823
authored
Apr 24, 2019
by
高宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复重置按钮;
parent
4742c06a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
11 deletions
+35
-11
clientHeader.vue
src/components/common/clientHeader.vue
+3
-1
keywordHeader.vue
src/components/common/keywordHeader.vue
+3
-3
list.vue
src/components/workLog/list.vue
+12
-2
workLogOfClient.vue
src/components/workLog/logOfClient/workLogOfClient.vue
+5
-2
workLogListForm.vue
src/components/workLog/workLogListForm.vue
+12
-3
No files found.
src/components/common/clientHeader.vue
View file @
9f17d823
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
:edit-client=
"editClient"
:edit-client=
"editClient"
:button-title=
"buttonTitle"
:button-title=
"buttonTitle"
:key-code=
"keyCode"
:key-code=
"keyCode"
:reset-form=
"resetForm"
:model=
"model"
v-if=
"type !== ''"
></component>
:model=
"model"
v-if=
"type !== ''"
></component>
</el-row>
</el-row>
</div>
</div>
...
@@ -39,7 +40,8 @@
...
@@ -39,7 +40,8 @@
'buttonTitle'
,
'buttonTitle'
,
'editClient'
,
'editClient'
,
'model'
,
'model'
,
'keyCode'
],
'keyCode'
,
'resetForm'
],
created
()
{
created
()
{
}
}
}
}
...
...
src/components/common/keywordHeader.vue
View file @
9f17d823
...
@@ -12,8 +12,8 @@
...
@@ -12,8 +12,8 @@
<i
class=
"fa fa-plus faa-pulse animated"
></i>
{{
buttonTitle
}}
<i
class=
"fa fa-plus faa-pulse animated"
></i>
{{
buttonTitle
}}
</el-button>
</el-button>
</el-form-item>
</el-form-item>
<el-form-item
v-if=
"searchKey"
>
<el-form-item>
<a
class=
"btn"
>
<a
class=
"btn"
@
click=
"resetForm"
>
<i
class=
"fa fa-fw fa-refresh faa-spin animated-hover"
></i>
<i
class=
"fa fa-fw fa-refresh faa-spin animated-hover"
></i>
</a>
</a>
</el-form-item>
</el-form-item>
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
// this.$emit('update:addNew')
// this.$emit('update:addNew')
// }
// }
},
},
props
:
[
'model'
,
'searchKey'
,
'keyCode'
,
'buttonTitle'
,
'searchKeyword'
,
'addNewUser'
],
props
:
[
'model'
,
'searchKey'
,
'keyCode'
,
'buttonTitle'
,
'searchKeyword'
,
'addNewUser'
,
'resetForm'
],
created
()
{
created
()
{
}
}
}
}
...
...
src/components/workLog/list.vue
View file @
9f17d823
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
:key-code=
"'keyword'"
:key-code=
"'keyword'"
type=
"keyword"
type=
"keyword"
button-title=
"新建工作日志"
button-title=
"新建工作日志"
:reset-form=
"resetForm"
:add-new-user=
"addNewLog"
:add-new-user=
"addNewLog"
:search-keyword=
"searchKeyword"
></client-header>
:search-keyword=
"searchKeyword"
></client-header>
<client-form
ref=
"clientForm"
:filter=
"filter"
@
update:clientList=
"form =>
{ updateForm(form) }">
</client-form>
<client-form
ref=
"clientForm"
:filter=
"filter"
@
update:clientList=
"form =>
{ updateForm(form) }">
</client-form>
...
@@ -242,13 +243,20 @@
...
@@ -242,13 +243,20 @@
},
},
updatePage
(
pager
)
{
updatePage
(
pager
)
{
Object
.
assign
(
this
.
pagenation
,
pager
)
Object
.
assign
(
this
.
pagenation
,
pager
)
this
.
getList
(
true
)
},
resetForm
()
{
this
.
$refs
.
clientForm
.
resetForm
()
Object
.
keys
(
this
.
form
).
forEach
(
item
=>
{
this
.
form
[
item
]
=
''
})
this
.
getList
()
this
.
getList
()
},
},
updateForm
(
form
)
{
updateForm
(
form
)
{
Object
.
assign
(
this
.
form
,
form
)
Object
.
assign
(
this
.
form
,
form
)
this
.
getList
()
this
.
getList
()
},
},
getList
()
{
getList
(
toTop
)
{
if
(
this
.
loading
)
{
if
(
this
.
loading
)
{
return
return
}
}
...
@@ -263,7 +271,9 @@
...
@@ -263,7 +271,9 @@
// this.pagenation.page = res.pagenation.thispage
// this.pagenation.page = res.pagenation.thispage
this
.
totalcount
=
res
.
pagenation
.
totalcount
this
.
totalcount
=
res
.
pagenation
.
totalcount
// this.totalcount = 8
// this.totalcount = 8
this
.
$el
.
querySelector
(
'.page-body-content'
).
scrollTo
(
0
,
0
)
if
(
toTop
)
{
this
.
$el
.
querySelector
(
'.page-body-content'
).
scrollTo
(
0
,
0
)
}
}).
finally
(
_
=>
{
}).
finally
(
_
=>
{
this
.
loading
=
false
this
.
loading
=
false
})
})
...
...
src/components/workLog/logOfClient/workLogOfClient.vue
View file @
9f17d823
...
@@ -211,9 +211,9 @@
...
@@ -211,9 +211,9 @@
},
},
updatePage
(
pager
)
{
updatePage
(
pager
)
{
Object
.
assign
(
this
.
pagenation
,
pager
)
Object
.
assign
(
this
.
pagenation
,
pager
)
this
.
getList
()
this
.
getList
(
true
)
},
},
getList
()
{
getList
(
toTop
)
{
if
(
this
.
loading
)
{
if
(
this
.
loading
)
{
return
return
}
}
...
@@ -226,6 +226,9 @@
...
@@ -226,6 +226,9 @@
this
.
result
.
list
=
res
.
list
this
.
result
.
list
=
res
.
list
// this.pagenation.page = res.pagenation.thispage
// this.pagenation.page = res.pagenation.thispage
this
.
totalcount
=
res
.
pagenation
.
totalcount
this
.
totalcount
=
res
.
pagenation
.
totalcount
if
(
toTop
)
{
this
.
$el
.
querySelector
(
'.page-body-content'
).
scrollTo
(
0
,
0
)
}
}).
finally
(
_
=>
{
}).
finally
(
_
=>
{
this
.
loading
=
false
this
.
loading
=
false
})
})
...
...
src/components/workLog/workLogListForm.vue
View file @
9f17d823
...
@@ -62,13 +62,12 @@
...
@@ -62,13 +62,12 @@
// this.$refs['elCasc' + key][0].menuVisible = false
// this.$refs['elCasc' + key][0].menuVisible = false
},
},
setCascader
(
item
,
key
)
{
setCascader
(
item
,
key
)
{
console
.
log
(
item
.
cascader
)
if
(
item
.
cascader
.
length
===
1
)
{
if
(
item
.
cascader
.
length
===
1
)
{
this
.
clientForm
[
item
.
key
]
=
item
.
cascader
[
0
]
this
.
clientForm
[
item
.
key
]
=
item
.
cascader
[
0
]
this
.
clientForm
[
item
.
itemKey
]
=
''
this
.
clientForm
[
item
.
itemKey
]
=
''
}
else
if
(
item
.
cascader
.
length
===
2
)
{
}
else
if
(
item
.
cascader
.
length
===
2
)
{
this
.
clientForm
[
item
.
itemKey
]
=
item
.
cascader
[
1
]
this
.
clientForm
[
item
.
itemKey
]
=
item
.
cascader
[
0
]
this
.
clientForm
[
item
.
key
]
=
item
.
cascader
[
0
]
this
.
clientForm
[
item
.
key
]
=
item
.
cascader
[
1
]
}
else
{
}
else
{
this
.
clientForm
[
item
.
itemKey
]
=
''
this
.
clientForm
[
item
.
itemKey
]
=
''
this
.
clientForm
[
item
.
key
]
=
''
this
.
clientForm
[
item
.
key
]
=
''
...
@@ -124,6 +123,16 @@
...
@@ -124,6 +123,16 @@
}
else
{
}
else
{
this
.
clientForm
[
'Filter[sort]'
]
=
'ASC'
this
.
clientForm
[
'Filter[sort]'
]
=
'ASC'
}
}
},
resetForm
()
{
Object
.
keys
(
this
.
clientForm
).
forEach
(
item
=>
{
this
.
clientForm
[
item
]
=
''
})
this
.
filter
.
forEach
(
item
=>
{
if
(
item
.
cascader
)
{
item
.
cascader
=
[]
}
})
}
}
},
},
mounted
()
{
mounted
()
{
...
...
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