Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
Project
Project
Details
Activity
Releases
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
周远喜
mes-ui
Commits
a68d5a4b
Commit
a68d5a4b
authored
Oct 28, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
任务
parent
a014758f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
806 additions
and
682 deletions
+806
-682
projectTaskTree.vue
components/page/projectTaskTree.vue
+229
-175
state.vue
components/page/state.vue
+50
-34
index.vue
pages/project/task/index.vue
+527
-473
No files found.
components/page/projectTaskTree.vue
View file @
a68d5a4b
This diff is collapsed.
Click to expand it.
components/page/state.vue
View file @
a68d5a4b
<
template
>
<div
class=
"ib"
@
click=
"showLife"
>
<div
class=
"ib"
v-if=
"!isMore"
>
<span
v-if=
"type=='text'"
:style=
"style"
>
{{
name
}}
</span>
<Tag
v-if=
"type=='tag'"
:color=
"tagcolor"
>
{{
name
}}
</Tag>
<Badge
v-if=
"type=='dot'"
:color=
"tagcolor"
:text=
"name"
/>
<Icon
v-if=
"type=='icon'"
:type=
"item.icon"
:color=
"tagcolor"
:title=
"name"
size=
"24"
/>
<span
v-if=
"type == 'text'"
:style=
"style"
>
{{
name
}}
</span>
<Tag
v-if=
"type == 'tag'"
:color=
"tagcolor"
>
{{
name
}}
</Tag>
<Badge
v-if=
"type == 'dot'"
:color=
"tagcolor"
:text=
"name"
/>
<Icon
v-if=
"type == 'icon'"
:type=
"item.icon"
:color=
"tagcolor"
:title=
"name"
:size=
"size"
/>
</div>
<div
class=
"ib"
v-else
v-for=
"(li,i) in items"
:key=
"i"
>
<span
v-if=
"type
=='text'"
:style=
"li.style"
>
{{
li
.
name
}}
</span>
<Tag
v-if=
"type
=='tag'"
:color=
"li.tagcolor"
>
{{
li
.
name
}}
</Tag>
<Badge
v-if=
"type
==
'dot'"
:color=
"li.tagcolor"
:text=
"li.name"
/>
<div
class=
"ib"
v-else
v-for=
"(li,
i) in items"
:key=
"i"
>
<span
v-if=
"type
== 'text'"
:style=
"li.style"
>
{{
li
.
name
}}
</span>
<Tag
v-if=
"type
== 'tag'"
:color=
"li.tagcolor"
>
{{
li
.
name
}}
</Tag>
<Badge
v-if=
"type
==
'dot'"
:color=
"li.tagcolor"
:text=
"li.name"
/>
</div>
<Modal
v-model=
"modal"
title=
"生命周期"
width=
"800"
footer-hide
:mask-closable=
"false"
>
<component
:is=
"detail"
:code=
"code"
:value=
"value"
:mode=
"mode"
/>
<Modal
v-model=
"modal"
title=
"生命周期"
width=
"800"
footer-hide
:mask-closable=
"false"
>
<component
:is=
"detail"
:code=
"code"
:value=
"value"
:mode=
"mode"
/>
</Modal>
</div>
</
template
>
...
...
@@ -21,48 +33,52 @@ export default {
name
:
"state"
,
data
()
{
return
{
mode
:
'0'
,
mode
:
"0"
,
name
:
""
,
isMore
:
false
,
modal
:
false
,
modal
:
false
,
item
:
{},
items
:
[],
data
:
[],
detail
:
null
,
detail
:
null
,
};
},
props
:
{
default
:
{
type
:
String
,
default
:
""
default
:
""
,
},
type
:
{
type
:
String
,
default
:
"text"
,
validator
:
function
(
value
)
{
validator
:
function
(
value
)
{
return
[
"text"
,
"tag"
,
"dot"
,
"icon"
].
indexOf
(
value
)
!=
-
1
;
}
}
,
},
code
:
{
type
:
String
,
required
:
true
required
:
true
,
},
value
:
{
type
:
[
String
,
Number
],
required
:
false
required
:
false
,
},
color
:
{
type
:
Boolean
,
default
:
true
default
:
true
,
},
size
:
{
type
:
Number
,
default
:
24
,
},
icon
:
{
type
:
Boolean
,
default
:
false
default
:
false
,
},
img
:
{
type
:
Boolean
,
default
:
false
}
default
:
false
,
}
,
},
created
()
{
this
.
data
=
this
.
$store
.
getters
.
dictionaryByKey
(
this
.
code
)
||
[];
...
...
@@ -71,7 +87,7 @@ export default {
setName
(
v
)
{
if
((
v
+
""
).
indexOf
(
","
)
==
-
1
)
{
var
item
;
this
.
data
.
map
(
u
=>
{
this
.
data
.
map
(
(
u
)
=>
{
if
(
u
.
code
==
v
)
{
item
=
u
;
}
...
...
@@ -81,7 +97,7 @@ export default {
this
.
item
=
item
;
}
else
{
if
(
this
.
value
==
"undefined"
)
{
this
.
name
=
' '
this
.
name
=
" "
;
}
else
{
this
.
name
=
this
.
value
;
}
...
...
@@ -90,7 +106,7 @@ export default {
this
.
isMore
=
true
;
var
items
=
[];
var
ul
=
(
v
+
""
).
split
(
","
);
this
.
data
.
map
(
u
=>
{
this
.
data
.
map
(
(
u
)
=>
{
if
(
ul
.
indexOf
(
u
.
code
)
>
-
1
)
{
u
.
tagcolor
=
u
.
color
|
"default"
;
u
.
style
=
{
color
:
u
.
color
|
"inherit"
};
...
...
@@ -99,11 +115,11 @@ export default {
});
this
.
items
=
items
;
}
}
,
showLife
()
{
this
.
modal
=
true
;
this
.
detail
=
()
=>
import
(
"./life"
);
}
}
,
showLife
()
{
this
.
modal
=
true
;
this
.
detail
=
()
=>
import
(
"./life"
);
}
,
},
computed
:
{
tagcolor
()
{
...
...
@@ -125,9 +141,9 @@ export default {
color
:
this
.
item
&&
this
.
item
.
color
!=
""
&&
this
.
item
.
color
!=
null
?
this
.
item
.
color
:
"inherit"
:
"inherit"
,
};
}
}
,
},
watch
:
{
value
(
v
)
{
...
...
@@ -139,7 +155,7 @@ export default {
this
.
setName
(
this
.
value
);
this
.
$forceUpdate
();
}
}
}
}
,
}
,
};
</
script
>
\ No newline at end of file
pages/project/task/index.vue
View file @
a68d5a4b
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