Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
P
project
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
高宇
project
Commits
ba6c9af1
Commit
ba6c9af1
authored
Apr 08, 2019
by
高宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成商机信息;
parent
2a5b34f8
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
189 additions
and
22 deletions
+189
-22
project.js
src/apis/project.js
+8
-0
app.scss
src/assets/css/app.scss
+23
-2
singleRadio.vue
src/components/common/singleRadio.vue
+5
-5
list.vue
src/components/project/list.vue
+12
-6
addProject.vue
src/components/project/operation/addProject.vue
+22
-1
editProject.vue
src/components/project/operation/editProject.vue
+22
-1
operationAnnotation.vue
src/components/project/operation/operationAnnotation.vue
+79
-0
operationProject.vue
src/components/project/operation/operationProject.vue
+8
-6
projectOfClient.vue
src/components/project/projectOfClient/projectOfClient.vue
+9
-1
singleItemMixin.js
src/lib/singleItemMixin.js
+1
-0
No files found.
src/apis/project.js
View file @
ba6c9af1
...
@@ -8,6 +8,14 @@ export default {
...
@@ -8,6 +8,14 @@ export default {
getProjectList
:
{
getProjectList
:
{
url
:
'/vue/project/list'
url
:
'/vue/project/list'
},
},
// 保存新建商机
saveProjectNew
:
{
url
:
'/vue/project/save-new'
},
// 保存编辑商机
saveProjectEdit
:
{
url
:
'/vue/project/save-edit'
},
// 删除商机
// 删除商机
delProject
:
{
delProject
:
{
url
:
'/vue/project/delete'
url
:
'/vue/project/delete'
...
...
src/assets/css/app.scss
View file @
ba6c9af1
.
elemen
t-app
{
.
projec
t-app
{
.mb20
{
.mb20
{
margin-bottom
:
20px
;
margin-bottom
:
20px
;
}
.el-button--cancel
{
color
:white
;
background-color
:
#EB7567
;
border-color
:
#e86150
;
}
.el-button--confirm
{
color
:white
;
background-color
:
#649FD7
;
border-color
:
#5092d2
;
}
.el-dialog__header
{
background-color
:
#333744
;
}
.el-dialog__title
{
color
:white
;
}
.is-disabled
{
color
:
#fff
!
important
;
background-color
:
#999
!
important
;
border-color
:
#888
!
important
;
}
}
}
}
src/components/common/singleRadio.vue
View file @
ba6c9af1
<
template
>
<
template
>
<section>
<section
class=
"single-radio"
>
<el-row
:gutter=
"10"
>
<el-row
:gutter=
"10"
>
<el-col
:span=
"4"
:class=
"['client-label', 'text-right',
{'required': required}]">
<el-col
:span=
"4"
:class=
"['client-label', 'text-right',
{'required': required}]">
<span>
{{
label
}}
</span>
<span>
{{
label
}}
</span>
...
@@ -36,23 +36,23 @@
...
@@ -36,23 +36,23 @@
</
script
>
</
script
>
<
style
>
<
style
>
.
el-radio-button__inner
,
.el-radio-button
:last-child
.el-radio-button__inner
,
.el-radio-button
:first-child
.el-radio-button__inner
{
.
single-radio
.el-radio-button__inner
,
.single-radio
.el-radio-button
:last-child
.el-radio-button__inner
,
.single-radio
.el-radio-button
:first-child
.el-radio-button__inner
{
border-left
:
1px
solid
#DCDFE6
;
border-left
:
1px
solid
#DCDFE6
;
margin
:
0
10px
5px
0
;
margin
:
0
10px
5px
0
;
border-radius
:
6px
!important
;
border-radius
:
6px
!important
;
}
}
.el-radio-button__inner
:hover
{
.
single-radio
.
el-radio-button__inner
:hover
{
color
:
#333
;
color
:
#333
;
background-color
:
#e6e6e6
;
background-color
:
#e6e6e6
;
border-color
:
#adadad
;
border-color
:
#adadad
;
}
}
.el-radio-button__orig-radio
:checked
+
.el-radio-button__inner
{
.
single-radio
.
el-radio-button__orig-radio
:checked
+
.el-radio-button__inner
{
color
:
#fff
;
color
:
#fff
;
background-color
:
#3c3c3c
;
background-color
:
#3c3c3c
;
border-color
:
#373737
;
border-color
:
#373737
;
box-shadow
:
0
0
0
0
#373737
;
box-shadow
:
0
0
0
0
#373737
;
}
}
.el-radio-button__orig-radio
:checked
+
.el-radio-button__inner
:hover
{
.
single-radio
.
el-radio-button__orig-radio
:checked
+
.el-radio-button__inner
:hover
{
color
:
#333
;
color
:
#333
;
background-color
:
#d4d4d4
;
background-color
:
#d4d4d4
;
border-color
:
#8c8c8c
;
border-color
:
#8c8c8c
;
...
...
src/components/project/list.vue
View file @
ba6c9af1
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<section>
<section>
<div
class=
"content"
>
<div
class=
"content"
>
<client-header
ref=
"clientHeader"
<client-header
ref=
"clientHeader"
title=
"
工作日志
"
title=
"
商机信息
"
:title-span=
"6"
:title-span=
"6"
:model=
"form"
:model=
"form"
search-key=
"ProjectSearch"
search-key=
"ProjectSearch"
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
type=
"primary"
type=
"primary"
size=
"mini"
size=
"mini"
:disabled=
"!item.can_schedule"
>
:disabled=
"!item.can_schedule"
>
<i
class=
"fa fa-th-list"
></i>
新建待办事项
<i
class=
"fa fa-th-list"
></i>
新建待办事项
</el-button>
</el-button>
<el-button
class=
"pull-right"
<el-button
class=
"pull-right"
type=
"primary"
type=
"primary"
...
@@ -46,8 +46,9 @@
...
@@ -46,8 +46,9 @@
<el-button
class=
"pull-right"
<el-button
class=
"pull-right"
type=
"primary"
type=
"primary"
size=
"mini"
size=
"mini"
@
click=
"editAnnotation(item)"
:disabled=
"!item.can_update"
>
:disabled=
"!item.can_update"
>
<i
class=
"fa fa-tag"
></i>
批注
</el-button>
<i
class=
"fa fa-tag"
></i>
批注
</el-button>
<el-button
class=
"pull-right"
<el-button
class=
"pull-right"
type=
"primary"
type=
"primary"
size=
"mini"
size=
"mini"
...
@@ -80,9 +81,10 @@
...
@@ -80,9 +81,10 @@
<side-popup
ref=
"sidePopup"
:title=
"operationTitle"
>
<side-popup
ref=
"sidePopup"
:title=
"operationTitle"
>
<component
:is=
"operationPage"
:ref=
"operationPage"
@
close=
"close"
></component>
<component
:is=
"operationPage"
:ref=
"operationPage"
@
close=
"close"
></component>
</side-popup>
</side-popup>
<operation-annotation
ref=
"operationAnnotation"
@
update:list=
"getList()"
></operation-annotation>
</section>
</section>
</
template
>
</
template
>
`
<
script
>
<
script
>
import
ScheduleItem
from
'../common/scheduleItem'
import
ScheduleItem
from
'../common/scheduleItem'
import
Pagenation
from
'./schedulePagenation'
import
Pagenation
from
'./schedulePagenation'
...
@@ -95,7 +97,7 @@
...
@@ -95,7 +97,7 @@
requestAPI
,
requestAPI
,
api
api
}
from
'@/lib/commonMixin'
}
from
'@/lib/commonMixin'
import
operationAnnotation
from
'./operation/operationAnnotation'
export
default
{
export
default
{
name
:
''
,
name
:
''
,
components
:
{
components
:
{
...
@@ -104,7 +106,8 @@
...
@@ -104,7 +106,8 @@
ScheduleItem
,
ScheduleItem
,
Pagenation
,
Pagenation
,
addProject
,
addProject
,
editProject
editProject
,
operationAnnotation
},
},
directives
:
{
directives
:
{
clickOutside
clickOutside
...
@@ -186,6 +189,9 @@
...
@@ -186,6 +189,9 @@
}
}
},
},
methods
:
{
methods
:
{
editAnnotation
(
item
)
{
this
.
$refs
.
operationAnnotation
.
show
(
item
)
},
leaveMessageSch
(
item
)
{
leaveMessageSch
(
item
)
{
this
.
$refs
.
leaveMessage
.
btnShow
(
item
)
this
.
$refs
.
leaveMessage
.
btnShow
(
item
)
},
},
...
...
src/components/project/operation/addProject.vue
View file @
ba6c9af1
...
@@ -13,7 +13,12 @@
...
@@ -13,7 +13,12 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
requestAPI
,
api
}
from
'@/lib/commonMixin'
import
operationProject
from
'./operationProject'
import
operationProject
from
'./operationProject'
import
{
setModule
}
from
'../../../lib/viewHelper'
export
default
{
export
default
{
name
:
''
,
name
:
''
,
components
:
{
components
:
{
...
@@ -25,7 +30,23 @@
...
@@ -25,7 +30,23 @@
}
}
},
},
methods
:
{
methods
:
{
saveProject
()
{},
saveProject
()
{
let
form
=
this
.
$refs
.
operationProject
.
getFormData
()
let
subData
=
Object
.
assign
({},
setModule
(
form
.
Projects
,
'Projects'
,
this
.
options
),
setModule
(
form
.
ProjectArchitects
,
'ProjectArchitects'
,
this
.
options
))
requestAPI
(
api
.
saveProjectNew
,
{
data
:
{...
subData
}
}).
then
(
res
=>
{
this
.
$message
({
message
:
'保存成功!'
,
type
:
'success'
})
this
.
close
()
},
error
=>
{
error
.
msg
.
forEach
(
item
=>
{
this
.
$set
(
this
.
errorData
,
item
.
name
,
item
.
error
)
})
})
},
close
()
{
close
()
{
this
.
$emit
(
'close'
)
this
.
$emit
(
'close'
)
},
},
...
...
src/components/project/operation/editProject.vue
View file @
ba6c9af1
...
@@ -13,7 +13,12 @@
...
@@ -13,7 +13,12 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
requestAPI
,
api
}
from
'@/lib/commonMixin'
import
operationProject
from
'./operationProject'
import
operationProject
from
'./operationProject'
import
{
setModule
}
from
'../../../lib/viewHelper'
export
default
{
export
default
{
name
:
''
,
name
:
''
,
components
:
{
components
:
{
...
@@ -25,7 +30,23 @@
...
@@ -25,7 +30,23 @@
}
}
},
},
methods
:
{
methods
:
{
saveProject
()
{},
saveProject
()
{
let
form
=
this
.
$refs
.
operationProject
.
getFormData
()
let
subData
=
Object
.
assign
({},
setModule
(
form
.
Projects
,
'Projects'
,
this
.
options
),
setModule
(
form
.
ProjectArchitects
,
'ProjectArchitects'
,
this
.
options
))
requestAPI
(
api
.
saveProjectEdit
,
{
data
:
{...
subData
}
}).
then
(
res
=>
{
this
.
$message
({
message
:
'保存成功!'
,
type
:
'success'
})
this
.
close
()
},
error
=>
{
error
.
msg
.
forEach
(
item
=>
{
this
.
$set
(
this
.
errorData
,
item
.
name
,
item
.
error
)
})
})
},
close
()
{
close
()
{
this
.
$emit
(
'close'
)
this
.
$emit
(
'close'
)
},
},
...
...
src/components/project/operation/operationAnnotation.vue
0 → 100644
View file @
ba6c9af1
<
template
>
<section>
<el-dialog
title=
"编辑商机批注"
:visible
.
sync=
"formVisible"
:modal-append-to-body=
"false"
:close=
"cancel"
>
<el-form
ref=
"form"
:model=
"model"
label-width=
"0"
>
<el-input
v-model=
"model.comment"
type=
"textarea"
:rows=
"15"
placeholder=
"请输入商机批注"
></el-input>
</el-form>
<div
slot=
"footer"
class=
"text-center"
>
<el-button
size=
"small"
@
click=
"formVisible = false"
>
取消
</el-button>
<!--确定-->
<el-button
size=
"small"
type=
"primary"
@
click=
"submit"
>
保存
</el-button>
<!--取 消-->
</div>
</el-dialog>
</section>
</
template
>
<
script
>
import
{
requestAPI
,
api
}
from
'@/lib/commonMixin'
import
{
setModule
}
from
'../../../lib/viewHelper'
export
default
{
name
:
''
,
data
()
{
return
{
formVisible
:
false
,
model
:
{
id
:
0
,
comment
:
''
}
}
},
methods
:
{
cancel
()
{
Object
.
keys
(
this
.
model
).
forEach
(
item
=>
{
this
.
model
[
item
]
=
''
})
},
submit
()
{
// console.log(this.model.comment.replace(/\n/g, '\r\n'))
requestAPI
(
api
.
saveProjectEdit
,
{
data
:
{
...
setModule
({
id
:
this
.
model
.
id
,
comment
:
this
.
model
.
comment
.
replace
(
/
\n
/g
,
'
\
r
\
n'
)
},
'Projects'
)
}
}).
then
(
res
=>
{
this
.
$message
({
message
:
'保存成功!'
,
type
:
'success'
})
this
.
formVisible
=
false
this
.
$emit
(
'update:list'
)
},
()
=>
{
this
.
$message
.
error
(
'保存失败!'
)
})
},
show
(
model
)
{
console
.
log
(
model
)
Object
.
keys
(
this
.
model
).
forEach
(
item
=>
{
console
.
log
(
this
.
model
[
item
])
this
.
model
[
item
]
=
model
[
item
]
})
this
.
formVisible
=
true
}
},
created
()
{
}
}
</
script
>
<
style
scoped
>
</
style
>
src/components/project/operation/operationProject.vue
View file @
ba6c9af1
...
@@ -273,7 +273,6 @@
...
@@ -273,7 +273,6 @@
description
:
''
,
description
:
''
,
project_title
:
''
,
project_title
:
''
,
collected
:
''
,
collected
:
''
,
uncollected
:
''
,
projectTags
:
''
,
projectTags
:
''
,
salesForecast
:
0
,
salesForecast
:
0
,
purchaseType
:
''
,
purchaseType
:
''
,
...
@@ -368,11 +367,11 @@
...
@@ -368,11 +367,11 @@
})
})
}
}
if
(
!
this
.
options
[
item
])
{
if
(
!
this
.
options
[
item
])
{
if
(
item
===
'Projects[project_tags]'
)
{
//
if (item === 'Projects[project_tags]') {
this
.
$set
(
this
.
options
,
'Projects[projectTags]'
,
res
.
options
[
item
])
//
this.$set(this.options, 'Projects[projectTags]', res.options[item])
}
else
{
//
} else {
this
.
$set
(
this
.
options
,
item
,
res
.
options
[
item
])
this
.
$set
(
this
.
options
,
item
,
res
.
options
[
item
])
}
//
}
}
else
{
}
else
{
Object
.
assign
(
this
.
options
[
item
],
res
.
options
[
item
])
Object
.
assign
(
this
.
options
[
item
],
res
.
options
[
item
])
}
}
...
@@ -404,6 +403,9 @@
...
@@ -404,6 +403,9 @@
this
.
Projects
.
client_id
=
res
.
model
.
client
.
key
this
.
Projects
.
client_id
=
res
.
model
.
client
.
key
}
}
})
})
},
getFormData
()
{
return
{
Projects
:
this
.
Projects
,
ProjectArchitects
:
this
.
ProjectArchitects
}
}
}
},
},
created
()
{
created
()
{
...
...
src/components/project/projectOfClient/projectOfClient.vue
View file @
ba6c9af1
...
@@ -37,11 +37,13 @@
...
@@ -37,11 +37,13 @@
<el-button
class=
"pull-right"
<el-button
class=
"pull-right"
type=
"primary"
type=
"primary"
size=
"mini"
size=
"mini"
@
click=
"editAnnotation(item)"
:disabled=
"!item.can_update"
>
:disabled=
"!item.can_update"
>
<i
class=
"fa fa-tag"
></i>
批注
</el-button>
<i
class=
"fa fa-tag"
></i>
批注
</el-button>
<el-button
class=
"pull-right"
<el-button
class=
"pull-right"
type=
"primary"
type=
"primary"
size=
"mini"
size=
"mini"
@
click=
"editAnnotation(item)"
@
click
.
prevent
.
stop=
"leaveMessageSch(item)"
>
@
click
.
prevent
.
stop=
"leaveMessageSch(item)"
>
<span
:class=
"['badge',
{'badge-unread': item.unread > 0}]"
<span
:class=
"['badge',
{'badge-unread': item.unread > 0}]"
v-if="item.commentCount">
{{
item
.
commentCount
.
comment
}}
</span>
v-if="item.commentCount">
{{
item
.
commentCount
.
comment
}}
</span>
...
@@ -71,6 +73,7 @@
...
@@ -71,6 +73,7 @@
<side-popup
ref=
"sidePopup"
:title=
"operationTitle"
>
<side-popup
ref=
"sidePopup"
:title=
"operationTitle"
>
<component
:is=
"operationPage"
:ref=
"operationPage"
@
close=
"close"
></component>
<component
:is=
"operationPage"
:ref=
"operationPage"
@
close=
"close"
></component>
</side-popup>
</side-popup>
<operation-annotation
ref=
"operationAnnotation"
@
update:list=
"getList()"
></operation-annotation>
</section>
</section>
</
template
>
</
template
>
...
@@ -85,6 +88,7 @@
...
@@ -85,6 +88,7 @@
import
clickOutside
from
'@/lib/bind'
import
clickOutside
from
'@/lib/bind'
import
addProject
from
'../operation/addProject'
import
addProject
from
'../operation/addProject'
import
editProject
from
'../operation/editProject'
import
editProject
from
'../operation/editProject'
import
operationAnnotation
from
'../operation/operationAnnotation'
export
default
{
export
default
{
name
:
''
,
name
:
''
,
directives
:
{
directives
:
{
...
@@ -173,9 +177,13 @@
...
@@ -173,9 +177,13 @@
clientHeader
,
clientHeader
,
Pagenation
,
Pagenation
,
addProject
,
addProject
,
editProject
editProject
,
operationAnnotation
},
},
methods
:
{
methods
:
{
editAnnotation
(
item
)
{
this
.
$refs
.
operationAnnotation
.
show
(
item
)
},
leaveMessageSch
(
item
)
{
leaveMessageSch
(
item
)
{
this
.
$refs
.
leaveMessage
.
btnShow
(
item
)
this
.
$refs
.
leaveMessage
.
btnShow
(
item
)
},
},
...
...
src/lib/singleItemMixin.js
View file @
ba6c9af1
...
@@ -128,6 +128,7 @@ export default {
...
@@ -128,6 +128,7 @@ export default {
'optionsList'
:
{
'optionsList'
:
{
handler
(
val
)
{
handler
(
val
)
{
if
(
this
.
engineerKey
)
{
if
(
this
.
engineerKey
)
{
this
.
engineer
=
[]
val
.
forEach
(
item
=>
{
val
.
forEach
(
item
=>
{
this
.
engineer
.
push
({
this
.
engineer
.
push
({
name
:
item
.
name
,
name
:
item
.
name
,
...
...
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