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
7e6a265a
Commit
7e6a265a
authored
Apr 12, 2019
by
高宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整 cascader 的筛选结果顺序;
parent
15545c98
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
229 additions
and
69 deletions
+229
-69
scheduleItem.vue
src/components/common/scheduleItem.vue
+2
-1
list.vue
src/components/workLog/list.vue
+56
-27
workLogOfClient.vue
src/components/workLog/logOfClient/workLogOfClient.vue
+113
-4
addLog.vue
src/components/workLog/work/addLog.vue
+8
-5
editLog.vue
src/components/workLog/work/editLog.vue
+7
-5
operationWorkLog.vue
src/components/workLog/work/operationWorkLog.vue
+9
-9
workLogListForm.vue
src/components/workLog/workLogListForm.vue
+2
-2
singleItemMixin.js
src/lib/singleItemMixin.js
+0
-1
vupVueSdk.css
static/vupVueSdk.css
+22
-5
vupVueSdk.js
static/vupVueSdk.js
+9
-9
vupVueSdk.js.map
static/vupVueSdk.js.map
+1
-1
No files found.
src/components/common/scheduleItem.vue
View file @
7e6a265a
...
...
@@ -109,10 +109,11 @@
}
},
toView
(
item
)
{
// console.log(item)
let
obj
=
{
name
:
'ofClient'
,
params
:
{
clientI
d
:
item
.
client_id
i
d
:
item
.
client_id
}
}
return
obj
...
...
src/components/workLog/list.vue
View file @
7e6a265a
...
...
@@ -55,18 +55,21 @@
:pager.sync="pagenation"
:total="totalcount">
</Pagenation>
<leave-message
v-click-outside=
"lmClose"
ref=
"leaveMessage"
:lmTemplate=
"lmTemplate"
:type=
"19"
>
</leave-message>
<!--
<el-button
type=
"primary"
@
click=
"showLeave"
>
测试
</el-button>
-->
</div>
</div>
<div
class=
"images clearfix"
style=
"display: none;"
>
<img
v-for=
"(source, index) in images"
:key=
"index"
:src=
"source"
class=
"image"
>
</div>
<leave-message
v-click-outside=
"lmClose"
ref=
"leaveMessage"
:lmTemplate=
"lmTemplate"
:type=
"2"
>
</leave-message>
<side-popup
ref=
"sidePopup"
:title=
"operationTitle"
>
<component
:is=
"operationPage"
:ref=
"operationPage"
@
close=
"close"
></component>
</side-popup>
</section>
</
template
>
...
...
@@ -74,9 +77,10 @@
import
ScheduleItem
from
'../common/scheduleItem'
import
Pagenation
from
'./schedulePagenation'
import
clientHeader
from
'../common/clientHeader'
import
LeaveMessage
from
'../common/leaveMessage'
import
clientForm
from
'./workLogListForm'
import
clickOutside
from
'@/lib/bind'
import
addLog
from
'./work/addLog'
import
editLog
from
'./work/editLog'
import
{
requestAPI
,
api
...
...
@@ -91,7 +95,8 @@
clientForm
,
ScheduleItem
,
Pagenation
,
LeaveMessage
addLog
,
editLog
},
directives
:
{
clickOutside
...
...
@@ -105,32 +110,40 @@
default
:
'未设置'
},
{
name
:
'
内容
'
,
value
:
'
description
'
name
:
'
开始时间
'
,
value
:
'
start_at
'
},
{
name
:
'
待办
时间'
,
value
:
'
schedule_week_display
'
name
:
'
结束
时间'
,
value
:
'
end_at
'
},
{
name
:
'
状态
'
,
value
:
'
schedule_status
_display'
name
:
'
用时
'
,
value
:
'
hours_spent
_display'
},
{
name
:
'
开始时间
'
,
value
:
'
start_a
t'
name
:
'
陪同人员
'
,
value
:
'
escor
t'
},
{
name
:
'结束时间'
,
value
:
'end_at'
name
:
'日志类型'
,
value
:
'scenarios.name'
},
{
name
:
'工作内容'
,
value
:
'scenarioOption.name'
},
{
name
:
'情况说明'
,
value
:
'description'
},
{
name
:
'
重复
'
,
value
:
'
repeatSchedul
e'
name
:
'
客户经理
'
,
value
:
'
client.salesRep.nam
e'
},
{
name
:
'
负责
人'
,
value
:
'
repeatSchedul
e'
name
:
'
录入
人'
,
value
:
'
createdBy.nam
e'
},
{
name
:
'创建时间'
,
...
...
@@ -152,17 +165,19 @@
page
:
1
},
totalcount
:
0
,
operationPage
:
''
,
operationTitle
:
''
,
loading
:
false
,
images
:
[]
}
},
methods
:
{
leaveMessageSch
(
item
)
{
this
.
$refs
.
leaveMessage
.
is
Show
(
item
)
this
.
$refs
.
leaveMessage
.
btn
Show
(
item
)
},
lmClose
()
{
this
.
$refs
.
leaveMessage
&&
this
.
$refs
.
leaveMessage
.
is
Close
()
this
.
$refs
.
leaveMessage
.
btn
Close
()
},
setImage
(
imgs
)
{
this
.
images
=
imgs
...
...
@@ -177,7 +192,16 @@
})
},
editLog
(
row
)
{
this
.
$router
.
push
({
name
:
'workLogEdit'
,
params
:
{
id
:
row
.
id
}})
// this.$router.push({name: 'workLogEdit', params: {id: row.id}})
this
.
operationPage
=
'editLog'
this
.
operationTitle
=
'编辑工作日志'
// this.$router.push({name: 'editProject', params: {id: row.id}})
this
.
$nextTick
(()
=>
{
this
.
$refs
.
sidePopup
.
show
(
this
.
$refs
[
this
.
operationPage
].
init
(
row
.
id
))
})
},
close
()
{
this
.
$refs
.
sidePopup
.
close
()
},
delLog
(
id
)
{
this
.
$confirm
(
'确认删除吗?'
,
'提示'
).
then
(()
=>
{
...
...
@@ -202,8 +226,13 @@
})
},
addNewLog
()
{
this
.
$router
.
push
({
name
:
'workLogAdd'
})
// this.$refs.leaveModule.isShow('新建客户', 'clientAdd')
// this.$router.push({name: 'workLogAdd'})
this
.
operationPage
=
'addLog'
this
.
operationTitle
=
'新建工作日志'
// this.$router.push({name: 'editProject', params: {id: row.id}})
this
.
$nextTick
(()
=>
{
this
.
$refs
.
sidePopup
.
show
(
this
.
$refs
[
this
.
operationPage
].
init
())
})
},
searchKeyword
(
search
)
{
this
.
updateForm
(
search
)
...
...
src/components/workLog/logOfClient/workLogOfClient.vue
View file @
7e6a265a
...
...
@@ -49,8 +49,17 @@
:pager.sync="pagenation"
:total="totalcount">
</Pagenation>
<leave-message
v-click-outside=
"lmClose"
ref=
"leaveMessage"
:lmTemplate=
"lmTemplate"
:type=
"19"
>
</leave-message>
</div>
</div>
<side-popup
ref=
"sidePopup"
:title=
"operationTitle"
>
<component
:is=
"operationPage"
:ref=
"operationPage"
@
close=
"close"
></component>
</side-popup>
</section>
</
template
>
...
...
@@ -62,12 +71,63 @@
import
ScheduleItem
from
'../../common/scheduleItem'
import
clientHeader
from
'../../common/clientHeader'
import
Pagenation
from
'../schedulePagenation'
import
clickOutside
from
'@/lib/bind'
import
addLog
from
'../work/addLog'
import
editLog
from
'../work/editLog'
export
default
{
name
:
''
,
data
()
{
return
{
lmTemplate
:
[
{
name
:
'客户名称'
,
value
:
'client.name'
,
default
:
'未设置'
},
{
name
:
'开始时间'
,
value
:
'start_at'
},
{
name
:
'结束时间'
,
value
:
'end_at'
},
{
name
:
'用时'
,
value
:
'hours_spent_display'
},
{
name
:
'陪同人员'
,
value
:
'start_at'
},
{
name
:
'日志类型'
,
value
:
'scenarios.name'
},
{
name
:
'工作内容'
,
value
:
'scenarioOption.name'
},
{
name
:
'情况说明'
,
value
:
'description'
},
{
name
:
'客户经理'
,
value
:
'created_at'
},
{
name
:
'录入人'
,
value
:
'created_at'
},
{
name
:
'创建时间'
,
value
:
'created_at'
}
],
client_id
:
''
,
operationPage
:
''
,
operationTitle
:
''
,
loading
:
false
,
clientName
:
''
,
model
:
{
...
...
@@ -84,17 +144,66 @@
tableList
:
[]
}
},
directives
:
{
clickOutside
},
components
:
{
ScheduleItem
,
clientHeader
,
Pagenation
Pagenation
,
addLog
,
editLog
},
methods
:
{
leaveMessageSch
(
item
)
{
this
.
$refs
.
leaveMessage
.
btnShow
(
item
)
},
lmClose
()
{
this
.
$refs
.
leaveMessage
&&
this
.
$refs
.
leaveMessage
.
btnClose
()
},
editWorkLog
(
row
)
{
this
.
$router
.
push
({
name
:
'workLogEdit'
,
params
:
{
id
:
row
.
id
}})
// this.$router.push({name: 'workLogEdit', params: {id: row.id}})
this
.
operationPage
=
'editLog'
this
.
operationTitle
=
'编辑工作日志'
// this.$router.push({name: 'editProject', params: {id: row.id}})
this
.
$nextTick
(()
=>
{
this
.
$refs
.
sidePopup
.
show
(
this
.
$refs
[
this
.
operationPage
].
init
(
row
.
id
))
})
},
close
()
{
this
.
$refs
.
sidePopup
.
close
()
},
delLog
(
id
)
{
this
.
$confirm
(
'确认删除吗?'
,
'提示'
).
then
(()
=>
{
requestAPI
(
api
.
delWorkLog
,
{
data
:
{
id
}
}).
then
(()
=>
{
this
.
$message
(
'删除成功!'
)
this
.
getList
()
},
error
=>
{
if
(
Array
.
isArray
(
error
.
msg
))
{
error
.
msg
.
forEach
(
item
=>
{
this
.
$notify
.
error
({
title
:
'错误'
,
message
:
item
.
error
})
})
}
})
}).
catch
(
_
=>
{
})
},
addWorkLog
()
{
this
.
$router
.
push
({
name
:
'workLogClientAdd'
,
params
:
{
clientId
:
this
.
$route
.
params
.
id
}})
// this.$router.push({name: 'workLogClientAdd', params: {clientId: this.$route.params.id}})
this
.
operationPage
=
'addLog'
this
.
operationTitle
=
'新建工作日志'
// this.$router.push({name: 'editProject', params: {id: row.id}})
this
.
$nextTick
(()
=>
{
this
.
$refs
.
sidePopup
.
show
(
this
.
$refs
[
this
.
operationPage
].
init
(
this
.
$route
.
params
.
id
))
})
},
updatePage
(
pager
)
{
Object
.
assign
(
this
.
pagenation
,
pager
)
...
...
src/components/workLog/work/addLog.vue
View file @
7e6a265a
...
...
@@ -51,7 +51,7 @@
cancelButtonText
:
'否'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
saveFun
(
Object
.
assign
({},
subData
,
{
is_draft
:
1
}))
this
.
saveFun
(
Object
.
assign
({},
subData
,
{
'WorkLogs[is_draft]'
:
1
}))
}).
catch
(
_
=>
{
this
.
saveFun
(
subData
)
})
...
...
@@ -67,16 +67,19 @@
message
:
'保存成功!'
,
type
:
'success'
})
this
.
close
(
true
)
},
error
=>
{
error
.
msg
.
forEach
(
item
=>
{
this
.
$set
(
this
.
errorData
,
item
.
name
,
item
.
error
)
})
})
},
close
()
{}
close
(
getList
)
{
this
.
$emit
(
'close'
,
getList
)
},
mounted
()
{
this
.
$refs
.
operationWorkLog
.
initAdd
()
init
(
id
)
{
this
.
$refs
.
operationWorkLog
.
initAdd
(
id
)
}
}
}
</
script
>
...
...
src/components/workLog/work/editLog.vue
View file @
7e6a265a
...
...
@@ -50,7 +50,7 @@
cancelButtonText
:
'否'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
saveFun
(
Object
.
assign
({},
subData
,
{
is_draft
:
1
}))
this
.
saveFun
(
Object
.
assign
({},
subData
,
{
'WorkLogs[is_draft]'
:
1
}))
}).
catch
(
_
=>
{
this
.
saveFun
(
subData
)
})
...
...
@@ -66,17 +66,19 @@
message
:
'保存成功!'
,
type
:
'success'
})
this
.
close
(
true
)
},
error
=>
{
error
.
msg
.
forEach
(
item
=>
{
this
.
$set
(
this
.
errorData
,
item
.
name
,
item
.
error
)
})
})
},
close
()
{
}
close
(
getList
)
{
this
.
$emit
(
'close'
,
getList
)
},
mounted
()
{
this
.
$refs
.
operationWorkLog
.
initEdit
()
init
(
id
)
{
this
.
$refs
.
operationWorkLog
.
initEdit
(
id
)
}
}
}
</
script
>
...
...
src/components/workLog/work/operationWorkLog.vue
View file @
7e6a265a
...
...
@@ -68,7 +68,7 @@
label=
"工作日志类型"
:required=
"true"
:form-item=
"WorkLogs.scenario_id"
:options-list=
"getOptions('WorkLog
Search
[scenario_id]')"
:options-list=
"getOptions('WorkLog
s
[scenario_id]')"
:set-option=
"setScenarioOption"
@
update:item=
"val =>
{WorkLogs.scenario_id = val}">
<span
slot=
"formError"
class=
"el-form-item__error"
>
...
...
@@ -218,26 +218,26 @@
// this.WorkLogs.scenario_id = 1
this
.
setScenarioOption
(
this
.
WorkLogs
.
scenario_id
)
},
initAdd
()
{
if
(
this
.
$route
.
params
.
clientI
d
)
{
this
.
WorkLogs
.
client_id
=
this
.
$route
.
params
.
clientI
d
initAdd
(
id
)
{
if
(
i
d
)
{
this
.
WorkLogs
.
client_id
=
i
d
requestAPI
(
api
.
getClient
,
{
data
:
{
id
:
this
.
$route
.
params
.
clientI
d
id
:
i
d
}
}).
then
(
res
=>
{
this
.
searchText
=
res
.
model
.
name
})
requestAPI
(
api
.
searchContactByClientId
,
{
data
:
{
client_id
:
this
.
$route
.
params
.
clientI
d
client_id
:
i
d
}
}).
then
(
res
=>
{
this
.
options
[
'WorkLogs[workLogContacts]'
].
value
=
res
})
requestAPI
(
api
.
searchProjectByClientId
,
{
data
:
{
client_id
:
this
.
$route
.
params
.
clientI
d
client_id
:
i
d
}
}).
then
(
res
=>
{
this
.
options
[
'WorkLogs[project_id]'
].
value
=
res
...
...
@@ -259,10 +259,10 @@
})
})
},
initEdit
()
{
initEdit
(
id
)
{
requestAPI
(
api
.
getWorkLogEdit
,
{
data
:
{
id
:
this
.
$route
.
params
.
id
id
}
}).
then
(
res
=>
{
Object
.
keys
(
res
.
options
).
forEach
(
item
=>
{
...
...
src/components/workLog/workLogListForm.vue
View file @
7e6a265a
...
...
@@ -79,8 +79,8 @@
let
keys
=
findWhere
(
item
.
value
,
item
.
default
,
'key'
)
if
(
keys
.
node
)
{
if
(
keys
.
parentNode
)
{
this
.
clientForm
[
item
.
itemKey
]
=
keys
.
parentN
ode
.
key
this
.
clientForm
[
item
.
key
]
=
keys
.
n
ode
.
key
this
.
clientForm
[
item
.
itemKey
]
=
keys
.
n
ode
.
key
this
.
clientForm
[
item
.
key
]
=
keys
.
parentN
ode
.
key
item
.
cascader
=
[
keys
.
parentNode
.
key
,
keys
.
node
.
key
]
}
else
{
this
.
clientForm
[
item
.
itemKey
]
=
''
...
...
src/lib/singleItemMixin.js
View file @
7e6a265a
...
...
@@ -96,7 +96,6 @@ export default {
'formItem'
:
{
handler
(
val
)
{
if
(
Array
.
isArray
(
val
))
{
console
.
log
(
val
)
this
.
items
=
val
}
else
{
this
.
item
=
val
...
...
static/vupVueSdk.css
View file @
7e6a265a
...
...
@@ -13044,7 +13044,7 @@ html.iframe {
body
{
padding-bottom
:
0
;
min-height
:
100%
;
font-size
:
1
2px
;
font-size
:
1
rem
;
background-color
:
#F1F2F7
;
}
body
:before
{
...
...
@@ -13111,9 +13111,8 @@ input[type=file] {
padding
:
15px
15px
0
;
}
.el-form--label-top
.el-form-item__label
{
font-size
:
.875rem
;
line-height
:
14px
!important
;
font-weight
:
normal
;
line-height
:
1.5
!important
;
font-weight
:
400
;
}
.el-form--label-top
.el-form-item__label
{
padding
:
0
!important
;
...
...
@@ -13174,7 +13173,8 @@ input[type=file] {
.form-content
.el-col
{
padding
:
0
15px
;
}
.form-content
.el-col
.el-select
{
.form-content
.el-col
.el-select
,
.form-content
.el-col
.el-cascader
{
width
:
100%
;
}
/*--------Page Components--------*/
...
...
@@ -16424,4 +16424,21 @@ table {
.ec-icon-uncollapse
:before
{
content
:
'\F139'
;
}
.portal-content
{
position
:
fixed
;
top
:
100px
;
right
:
0
;
bottom
:
0
;
width
:
60%
;
background-color
:
#333744
;
color
:
white
;
font-size
:
14px
;
}
.portal-content
.content
{
width
:
100%
;
}
.portal-content
i
[
class
~=
fa-angle-double-right
]
{
cursor
:
pointer
;
font-size
:
20px
;
margin-top
:
6px
;
margin-left
:
10px
;
}
/*# sourceMappingURL=vupVueSdk.css.map*/
\ No newline at end of file
static/vupVueSdk.js
View file @
7e6a265a
This diff is collapsed.
Click to expand it.
static/vupVueSdk.js.map
View file @
7e6a265a
This diff is collapsed.
Click to expand it.
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