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
1e5eaa87
Commit
1e5eaa87
authored
Apr 21, 2019
by
daywrite
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新建项目
parent
2f874ed0
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
169 additions
and
20 deletions
+169
-20
task.js
src/apis/task.js
+5
-0
multipleCheckGroup.vue
src/components/common/multipleCheckGroup.vue
+117
-0
operationMixins.js
src/components/common/operationMixins.js
+6
-0
settingMixin.js
src/components/common/settingMixin.js
+12
-0
taskGroupForm.vue
src/components/task_group/taskGroupForm.vue
+10
-2
taskGroupModal.vue
src/components/task_group/taskGroupModal.vue
+7
-6
groupHome.vue
src/components/task_group_list/groupHome.vue
+10
-10
groupItem.vue
src/components/task_group_list/groupItem.vue
+2
-2
No files found.
src/apis/task.js
View file @
1e5eaa87
...
...
@@ -30,5 +30,10 @@ export default {
// ---项目列表---
getTaskGroupList
:
{
url
:
'/vue/task/list-group'
},
getTaskGroupNew
:
{
// url: '/vue/task/get-new-group'
url
:
'/vue/sales-order/get-new'
}
}
src/components/common/multipleCheckGroup.vue
0 → 100644
View file @
1e5eaa87
<
template
>
<section
class=
"multiple-check-group"
>
<el-row
:gutter=
"10"
>
<el-col
:span=
"4"
:class=
"['client-label', 'text-right',
{'required': required}]">
<span>
{{
label
}}
</span>
</el-col>
<el-col
:span=
"14"
>
<span
v-for=
"(item, key) in groupOptionsList"
:key=
"key"
>
<el-card
class=
"box-card"
:body-style=
"
{ padding: '10px' }"
v-if="item.child.length > 0">
<div
slot=
"header"
class=
"clearfix"
>
<el-checkbox
:indeterminate=
"item.isIndeterminate"
v-model=
"item.checkAll"
@
change=
"(val) =>
{handleCheckGroupAll(val, item)}">
{{
item
.
name
}}
</el-checkbox>
</div>
<el-checkbox-group
v-model=
"item.checkItems"
@
change=
"(value) =>
{handleCheckGroupChange(value, item)}">
<el-checkbox
v-for=
"(check, key) in item.child"
:label=
"check.key"
:key=
"key"
>
{{
check
.
name
}}
</el-checkbox>
</el-checkbox-group>
</el-card>
</span>
</el-col>
<el-col
:span=
"6"
>
<slot
name=
"formError"
></slot>
<span
class=
"tips"
>
{{
tips
}}
</span>
</el-col>
</el-row>
</section>
</
template
>
<
script
>
// import itemMixin from '../../lib/singleItemMixin'
export
default
{
name
:
'multiple-check-group'
,
// mixins: [itemMixin],
props
:
{
label
:
{
type
:
String
},
required
:
{
type
:
Boolean
},
tips
:
{
type
:
String
},
checkGroupFormItem
:
Array
,
checkGroupOptionsList
:
Array
},
data
()
{
return
{
groupOptionsList
:
[]
}
},
methods
:
{
handleCheckGroupAll
(
val
,
item
)
{
item
.
checkItems
=
val
?
item
.
child
.
map
(
i
=>
i
.
key
)
:
[]
item
.
isIndeterminate
=
false
},
handleCheckGroupChange
(
value
,
item
)
{
let
checkedCount
=
value
.
length
item
.
checkAll
=
checkedCount
===
item
.
child
.
length
item
.
isIndeterminate
=
checkedCount
>
0
&&
checkedCount
<
item
.
child
.
length
}
},
watch
:
{
checkGroupOptionsList
(
val
)
{
this
.
groupOptionsList
=
[]
val
.
forEach
(
item
=>
{
let
checkItems
=
item
.
child
.
map
(
i
=>
i
.
key
).
filter
(
i
=>
this
.
checkGroupFormItem
.
some
(
ele
=>
ele
===
i
))
this
.
$set
(
item
,
'isIndeterminate'
,
checkItems
.
length
>
0
&&
checkItems
.
length
<
item
.
child
.
length
)
this
.
$set
(
item
,
'checkAll'
,
checkItems
.
length
>
0
&&
checkItems
.
length
===
item
.
child
.
length
)
this
.
$set
(
item
,
'checkItems'
,
checkItems
)
this
.
groupOptionsList
.
push
(
item
)
})
},
groupOptionsList
:
{
handler
(
val
)
{
let
conArray
=
[]
val
.
forEach
(
item
=>
{
conArray
=
conArray
.
concat
(
item
.
checkItems
)
})
this
.
$emit
(
'update:item'
,
Array
.
from
(
new
Set
(
conArray
)))
},
deep
:
true
}
}
}
</
script
>
<
style
>
.multiple-check-group
.el-card
{
border
:
1px
solid
#5092d2
;
border-top-right-radius
:
4px
;
border-top-left-radius
:
4px
;
border-bottom-right-radius
:
4px
;
border-bottom-left-radius
:
4px
;
margin-bottom
:
20px
;
line-height
:
20px
;
}
.multiple-check-group
.el-card
.el-card__header
{
padding
:
10px
;
background-color
:
#649FD7
;
}
.multiple-check-group
.el-card
.el-card__header
.el-checkbox__label
{
color
:
#ffffff
;
}
</
style
>
src/components/common/operationMixins.js
0 → 100644
View file @
1e5eaa87
import
multipleCheckGroup
from
'./multipleCheckGroup'
export
default
{
components
:
{
multipleCheckGroup
}
}
src/components/common/settingMixin.js
View file @
1e5eaa87
...
...
@@ -58,6 +58,11 @@ export default {
taskGroupArray
()
{
let
ret
=
this
.
getArrayByKey
(
'Tasks'
,
'task_group_id'
)
return
ret
&&
[].
concat
(
ret
.
value
)
},
salesOrderRemindReceiversArray
()
{
let
ret
=
this
.
getArrayByKey
(
'SalesOrders'
,
'salesOrderRemindReceivers'
)
return
ret
&&
[].
concat
(
ret
.
value
)
}
},
...
...
@@ -81,6 +86,13 @@ export default {
})
},
getTaskGroupNew
()
{
requestAPI
(
api
.
getTaskGroupNew
)
.
then
((
res
)
=>
{
this
.
retNewArray
=
res
.
options
})
},
getTaskTask
()
{
requestAPI
(
api
.
getTaskNew
)
.
then
((
res
)
=>
{
...
...
src/components/task_group/taskGroupForm.vue
View file @
1e5eaa87
...
...
@@ -39,12 +39,20 @@
v-model
.
trim=
"model.title"
>
</el-input>
</el-form-item>
<el-form-item
label=
"提醒人"
prop=
"remindReceivers"
class=
"ec-clear-left ec-form-item-lg is-required"
>
<multiple-check-group
:check-group-form-item=
"model.remindReceivers"
:check-group-options-list=
"salesOrderRemindReceiversArray"
@
update:item=
"val =>
{model.remindReceivers = val}">
</multiple-check-group>
</el-form-item>
</el-form>
</section>
</
template
>
<
script
>
import
singleRadio
from
'../common/singleRadio'
import
settingMixin
from
'../common/settingMixin'
import
operationMixins
from
'../common/operationMixins'
import
depSelect
from
'../schedule/depSelect'
import
{
requestAPI
,
...
...
@@ -53,7 +61,7 @@ import {
export
default
{
name
:
'taskForm'
,
mixins
:
[
settingMixin
],
mixins
:
[
settingMixin
,
operationMixins
],
props
:
{
model
:
Object
...
...
@@ -96,7 +104,7 @@ export default {
},
mounted
()
{
this
.
initSetting
([
'getTask
Task
'
])
this
.
initSetting
([
'getTask
GroupNew
'
])
},
computed
:
{
...
...
src/components/task_group/taskGroupModal.vue
View file @
1e5eaa87
<
template
>
<section>
<sidePopup
ref=
"sidePopup"
title=
"新建项目清单"
:width=
"
4
0"
>
<TaskForm
<sidePopup
ref=
"sidePopup"
title=
"新建项目清单"
:width=
"
5
0"
>
<Task
Group
Form
:model=
"model"
>
</TaskForm>
</Task
Group
Form>
<div
class=
"mt20"
style=
"margin-left: 150px;"
>
<el-button
type=
"cancel"
@
click
.
stop
.
prevent=
"handleClose"
size=
"mini"
>
取 消
</el-button>
<el-button
type=
"confirm"
@
click
.
stop
.
prevent=
"save"
size=
"mini"
>
确 定
</el-button>
...
...
@@ -17,12 +17,12 @@ import {
api
,
UTIL
}
from
'@/lib/commonMixin'
import
Task
Form
from
'./task
Form'
import
Task
GroupForm
from
'./taskGroup
Form'
import
{
setModule
}
from
'@/lib/viewHelper'
export
default
{
components
:
{
TaskForm
Task
Group
Form
},
data
()
{
...
...
@@ -34,7 +34,8 @@ export default {
title
:
''
,
is_important
:
''
,
target_completed_at
:
''
,
description
:
''
description
:
''
,
remindReceivers
:
[]
}
}
},
...
...
src/components/task_group_list/groupHome.vue
View file @
1e5eaa87
...
...
@@ -53,10 +53,10 @@
</leave-message>
</div>
</div>
<
Reim
Modal
ref=
"
reim
Modal"
>
<
TaskGroup
Modal
ref=
"
taskGroup
Modal"
>
<!-- v-click-outside="scheduleClose" -->
</
Reim
Modal>
</
TaskGroup
Modal>
</section>
</
template
>
...
...
@@ -64,7 +64,7 @@
import
SearchHeader
from
'../common/searchHeader'
import
SearchForm
from
'../common/SearchForm'
import
GroupItem
from
'./groupItem'
import
ReimModal
from
'../reimbursement/reimbursement
Modal'
import
TaskGroupModal
from
'../task_group/taskGroup
Modal'
import
Pagenation
from
'./groupPagenation'
import
clickOutside
from
'@/lib/bind'
import
singleRadioTool
from
'../common/singleRadioTool'
...
...
@@ -74,7 +74,7 @@ import {
api
}
from
'@/lib/commonMixin'
export
default
{
name
:
'
reimbursement
Home'
,
name
:
'
taskGroup
Home'
,
mixins
:
[
SetParams
],
...
...
@@ -82,7 +82,7 @@ export default {
SearchHeader
,
SearchForm
,
GroupItem
,
Reim
Modal
,
TaskGroup
Modal
,
Pagenation
,
singleRadioTool
},
...
...
@@ -246,16 +246,16 @@ export default {
},
scheduleClose
()
{
this
.
$refs
.
reim
Modal
&&
this
.
$refs
.
reim
Modal
.
handleClose
()
this
.
$refs
.
taskGroup
Modal
&&
this
.
$refs
.
taskGroup
Modal
.
handleClose
()
},
addSch
()
{
this
.
$refs
.
reim
Modal
.
show
()
this
.
$refs
.
taskGroup
Modal
.
show
()
},
editSch
(
item
)
{
this
.
$refs
.
reim
Modal
.
show
(
item
)
this
.
$refs
.
taskGroup
Modal
.
show
(
item
)
},
deleteSch
(
id
)
{
...
...
src/components/task_group_list/groupItem.vue
View file @
1e5eaa87
...
...
@@ -28,7 +28,7 @@
<el-col
:span=
"6"
:xs=
"24"
>
<span>
负责人:
</span>
<span>
<
img
class=
"user-avatar rounded-circle"
:src=
"item.headOf.avatar.name"
>
{{
item
.
headOf
.
name
}}
<
!--
<img
class=
"user-avatar rounded-circle"
:src=
"item.headOf.avatar.name"
>
{{
item
.
headOf
.
name
}}
-->
</span>
</el-col>
<el-col
:span=
"6"
:xs=
"24"
>
...
...
@@ -45,7 +45,7 @@
<el-col
:span=
"6"
:xs=
"24"
>
<span>
成员:
</span>
<span
v-for=
"sItem in item.taskGroupUserRelationships"
>
<
img
class=
"user-avatar rounded-circle"
:src=
"item.user.avatar.name"
>
{{
item
.
user
.
name
}}
<
!--
<img
class=
"user-avatar rounded-circle"
:src=
"item.user.avatar.name"
>
{{
item
.
user
.
name
}}
-->
</span>
</el-col>
<el-col
:span=
"6"
:xs=
"24"
>
...
...
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