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
f77606a9
Commit
f77606a9
authored
Oct 28, 2020
by
周远喜
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product' of
http://git.mes123.com/zhouyx/mes-ui
into product
parents
2c62f0ff
3c2f481f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
846 additions
and
334 deletions
+846
-334
range.png
assets/imgicon/range.png
+0
-0
dateRange.vue
components/page/dateRange.vue
+20
-25
opration.vue
components/page/opration.vue
+12
-11
projectTaskTree.vue
components/page/projectTaskTree.vue
+235
-175
state.vue
components/page/state.vue
+50
-34
add.vue
pages/project/project/add.vue
+1
-1
index.vue
pages/project/record/index.vue
+13
-0
recordTimeLine.vue
pages/project/record/recordTimeLine.vue
+353
-0
add.vue
pages/project/task/add.vue
+11
-15
detail.vue
pages/project/task/detail.vue
+95
-23
index.vue
pages/project/task/index.vue
+54
-48
iview.js
plugins/iview.js
+2
-2
No files found.
assets/imgicon/range.png
0 → 100644
View file @
f77606a9
206 Bytes
components/page/
timeDifferenc
e.vue
→
components/page/
dateRang
e.vue
View file @
f77606a9
<
template
>
<
template
>
<div
class=
"time-view"
v-if=
"timeValue.startDate && timeValue.endDate"
>
<div
class=
"time-view"
v-if=
"timeValue.startDate && timeValue.endDate"
>
<span>
{{
timeValue
.
startDate
}}
</span
<div>
{{
timeValue
.
startDate
}}
</div>
>
<span
class=
"line"
>
————
</span>
<div
class=
"jian-tou"
>
<!--
{{
date
}}
-->
<div>
{{
date
}}
</div>
<span>
{{
timeValue
.
endDate
}}
</span>
</div>
<div
class=
"jian-tou"
></div>
<div>
{{
timeValue
.
endDate
}}
</div>
<div
class=
"day-time"
>
{{
date
}}
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -69,7 +68,7 @@ export default {
...
@@ -69,7 +68,7 @@ export default {
}
else
if
(
this
.
work
==
1
)
{
}
else
if
(
this
.
work
==
1
)
{
result
=
""
+
parseInt
(
dayC
)
+
"天"
;
result
=
""
+
parseInt
(
dayC
)
+
"天"
;
}
else
if
(
this
.
work
==
0
)
{
}
else
if
(
this
.
work
==
0
)
{
result
=
""
+
parseInt
(
hourC
)
+
"
小时
"
;
result
=
""
+
parseInt
(
hourC
)
+
"
h
"
;
}
}
// if (monthC >= 1) {
// if (monthC >= 1) {
// result = "" + parseInt(monthC) + "月";
// result = "" + parseInt(monthC) + "月";
...
@@ -96,25 +95,21 @@ export default {
...
@@ -96,25 +95,21 @@ export default {
</
script
>
</
script
>
<
style
lang=
"less"
>
<
style
lang=
"less"
>
.time-view {
.time-view {
width: 300px;
// width: 600px;
position: relative;
display: -webkit-flex;
.day-time {
display: flex;
position: absolute;
bottom: 11px;
left: 83px;
}
.line {
font-size: 18px;
}
.jian-tou {
.jian-tou {
position: absolute;
min-width: 55px;
bottom: 9px;
text-align: center;
left: 144px;
margin: 5px;
width: 7px;
background-image: url("../../assets/imgicon/range.png");
height: 7px;
background-size: 100%;
border-top: 2px solid #666;
background-repeat: no-repeat;
border-right: 2px solid #666;
margin-top: 7px;
transform: rotate(45deg);
div {
margin-top: -13px;
}
}
}
}
}
</
style
>
</
style
>
components/page/opration.vue
View file @
f77606a9
...
@@ -81,17 +81,18 @@ export default {
...
@@ -81,17 +81,18 @@ export default {
},
},
methods
:
{
methods
:
{
handler
()
{
handler
()
{
if
(
this
.
disable
==
0
)
{
if
(
this
.
oprate
==
"delete"
||
this
.
oprate
==
"remove"
)
{
if
(
this
.
oprate
==
"delete"
||
this
.
oprate
==
"remove"
)
{
this
.
$Modal
.
confirm
({
this
.
$Modal
.
confirm
({
title
:
this
.
title
,
title
:
this
.
title
,
content
:
"<p>"
+
this
.
msg
+
"</p>"
,
content
:
"<p>"
+
this
.
msg
+
"</p>"
,
onOk
:
()
=>
{
onOk
:
()
=>
{
this
.
$emit
(
"click"
,
event
);
this
.
$emit
(
"click"
,
event
);
}
}
});
});
}
else
{
}
else
{
this
.
$emit
(
"click"
,
event
);
this
.
$emit
(
"click"
,
event
);
}
}
}
}
}
},
},
...
...
components/page/projectTaskTree.vue
View file @
f77606a9
This diff is collapsed.
Click to expand it.
components/page/state.vue
View file @
f77606a9
<
template
>
<
template
>
<div
class=
"ib"
@
click=
"showLife"
>
<div
class=
"ib"
@
click=
"showLife"
>
<div
class=
"ib"
v-if=
"!isMore"
>
<div
class=
"ib"
v-if=
"!isMore"
>
<span
v-if=
"type=='text'"
:style=
"style"
>
{{
name
}}
</span>
<span
v-if=
"type == 'text'"
:style=
"style"
>
{{
name
}}
</span>
<Tag
v-if=
"type=='tag'"
:color=
"tagcolor"
>
{{
name
}}
</Tag>
<Tag
v-if=
"type == 'tag'"
:color=
"tagcolor"
>
{{
name
}}
</Tag>
<Badge
v-if=
"type=='dot'"
:color=
"tagcolor"
:text=
"name"
/>
<Badge
v-if=
"type == 'dot'"
:color=
"tagcolor"
:text=
"name"
/>
<Icon
v-if=
"type=='icon'"
:type=
"item.icon"
:color=
"tagcolor"
:title=
"name"
size=
"24"
/>
<Icon
v-if=
"type == 'icon'"
:type=
"item.icon"
:color=
"tagcolor"
:title=
"name"
:size=
"size"
/>
</div>
</div>
<div
class=
"ib"
v-else
v-for=
"(li,i) in items"
:key=
"i"
>
<div
class=
"ib"
v-else
v-for=
"(li,
i) in items"
:key=
"i"
>
<span
v-if=
"type
=='text'"
:style=
"li.style"
>
{{
li
.
name
}}
</span>
<span
v-if=
"type
== 'text'"
:style=
"li.style"
>
{{
li
.
name
}}
</span>
<Tag
v-if=
"type
=='tag'"
:color=
"li.tagcolor"
>
{{
li
.
name
}}
</Tag>
<Tag
v-if=
"type
== 'tag'"
:color=
"li.tagcolor"
>
{{
li
.
name
}}
</Tag>
<Badge
v-if=
"type
==
'dot'"
:color=
"li.tagcolor"
:text=
"li.name"
/>
<Badge
v-if=
"type
==
'dot'"
:color=
"li.tagcolor"
:text=
"li.name"
/>
</div>
</div>
<Modal
v-model=
"modal"
title=
"生命周期"
width=
"800"
footer-hide
:mask-closable=
"false"
>
<Modal
<component
:is=
"detail"
:code=
"code"
:value=
"value"
:mode=
"mode"
/>
v-model=
"modal"
title=
"生命周期"
width=
"800"
footer-hide
:mask-closable=
"false"
>
<component
:is=
"detail"
:code=
"code"
:value=
"value"
:mode=
"mode"
/>
</Modal>
</Modal>
</div>
</div>
</
template
>
</
template
>
...
@@ -21,48 +33,52 @@ export default {
...
@@ -21,48 +33,52 @@ export default {
name
:
"state"
,
name
:
"state"
,
data
()
{
data
()
{
return
{
return
{
mode
:
'0'
,
mode
:
"0"
,
name
:
""
,
name
:
""
,
isMore
:
false
,
isMore
:
false
,
modal
:
false
,
modal
:
false
,
item
:
{},
item
:
{},
items
:
[],
items
:
[],
data
:
[],
data
:
[],
detail
:
null
,
detail
:
null
,
};
};
},
},
props
:
{
props
:
{
default
:
{
default
:
{
type
:
String
,
type
:
String
,
default
:
""
default
:
""
,
},
},
type
:
{
type
:
{
type
:
String
,
type
:
String
,
default
:
"text"
,
default
:
"text"
,
validator
:
function
(
value
)
{
validator
:
function
(
value
)
{
return
[
"text"
,
"tag"
,
"dot"
,
"icon"
].
indexOf
(
value
)
!=
-
1
;
return
[
"text"
,
"tag"
,
"dot"
,
"icon"
].
indexOf
(
value
)
!=
-
1
;
}
}
,
},
},
code
:
{
code
:
{
type
:
String
,
type
:
String
,
required
:
true
required
:
true
,
},
},
value
:
{
value
:
{
type
:
[
String
,
Number
],
type
:
[
String
,
Number
],
required
:
false
required
:
false
,
},
},
color
:
{
color
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
true
default
:
true
,
},
size
:
{
type
:
Number
,
default
:
24
,
},
},
icon
:
{
icon
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
false
default
:
false
,
},
},
img
:
{
img
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
false
default
:
false
,
}
}
,
},
},
created
()
{
created
()
{
this
.
data
=
this
.
$store
.
getters
.
dictionaryByKey
(
this
.
code
)
||
[];
this
.
data
=
this
.
$store
.
getters
.
dictionaryByKey
(
this
.
code
)
||
[];
...
@@ -71,7 +87,7 @@ export default {
...
@@ -71,7 +87,7 @@ export default {
setName
(
v
)
{
setName
(
v
)
{
if
((
v
+
""
).
indexOf
(
","
)
==
-
1
)
{
if
((
v
+
""
).
indexOf
(
","
)
==
-
1
)
{
var
item
;
var
item
;
this
.
data
.
map
(
u
=>
{
this
.
data
.
map
(
(
u
)
=>
{
if
(
u
.
code
==
v
)
{
if
(
u
.
code
==
v
)
{
item
=
u
;
item
=
u
;
}
}
...
@@ -81,7 +97,7 @@ export default {
...
@@ -81,7 +97,7 @@ export default {
this
.
item
=
item
;
this
.
item
=
item
;
}
else
{
}
else
{
if
(
this
.
value
==
"undefined"
)
{
if
(
this
.
value
==
"undefined"
)
{
this
.
name
=
' '
this
.
name
=
" "
;
}
else
{
}
else
{
this
.
name
=
this
.
value
;
this
.
name
=
this
.
value
;
}
}
...
@@ -90,7 +106,7 @@ export default {
...
@@ -90,7 +106,7 @@ export default {
this
.
isMore
=
true
;
this
.
isMore
=
true
;
var
items
=
[];
var
items
=
[];
var
ul
=
(
v
+
""
).
split
(
","
);
var
ul
=
(
v
+
""
).
split
(
","
);
this
.
data
.
map
(
u
=>
{
this
.
data
.
map
(
(
u
)
=>
{
if
(
ul
.
indexOf
(
u
.
code
)
>
-
1
)
{
if
(
ul
.
indexOf
(
u
.
code
)
>
-
1
)
{
u
.
tagcolor
=
u
.
color
|
"default"
;
u
.
tagcolor
=
u
.
color
|
"default"
;
u
.
style
=
{
color
:
u
.
color
|
"inherit"
};
u
.
style
=
{
color
:
u
.
color
|
"inherit"
};
...
@@ -99,11 +115,11 @@ export default {
...
@@ -99,11 +115,11 @@ export default {
});
});
this
.
items
=
items
;
this
.
items
=
items
;
}
}
}
}
,
,
showLife
()
{
showLife
()
{
this
.
modal
=
true
;
this
.
modal
=
true
;
this
.
detail
=
()
=>
import
(
"./life"
);
this
.
detail
=
()
=>
import
(
"./life"
);
}
}
,
},
},
computed
:
{
computed
:
{
tagcolor
()
{
tagcolor
()
{
...
@@ -125,9 +141,9 @@ export default {
...
@@ -125,9 +141,9 @@ export default {
color
:
color
:
this
.
item
&&
this
.
item
.
color
!=
""
&&
this
.
item
.
color
!=
null
this
.
item
&&
this
.
item
.
color
!=
""
&&
this
.
item
.
color
!=
null
?
this
.
item
.
color
?
this
.
item
.
color
:
"inherit"
:
"inherit"
,
};
};
}
}
,
},
},
watch
:
{
watch
:
{
value
(
v
)
{
value
(
v
)
{
...
@@ -139,7 +155,7 @@ export default {
...
@@ -139,7 +155,7 @@ export default {
this
.
setName
(
this
.
value
);
this
.
setName
(
this
.
value
);
this
.
$forceUpdate
();
this
.
$forceUpdate
();
}
}
}
}
,
}
}
,
};
};
</
script
>
</
script
>
\ No newline at end of file
pages/project/project/add.vue
View file @
f77606a9
...
@@ -87,7 +87,7 @@
...
@@ -87,7 +87,7 @@
style=
"width: 300px"
style=
"width: 300px"
></DatePicker>
</FormItem
></DatePicker>
</FormItem
></Col>
></Col>
<!--
<
TimeDifference
:timeValue=
"timeValue"
:wrok=
"1"
></TimeDifferenc
e>
-->
<!--
<
DateDRange
:timeValue=
"timeValue"
:wrok=
"1"
></DateDRang
e>
-->
<Col
:span=
"12"
<Col
:span=
"12"
><FormItem
:label=
"l('type')"
prop=
"type"
>
><FormItem
:label=
"l('type')"
prop=
"type"
>
<Dictionary
<Dictionary
...
...
pages/project/record/index.vue
View file @
f77606a9
...
@@ -88,6 +88,19 @@ export default {
...
@@ -88,6 +88,19 @@ export default {
);
);
},
},
},
},
{
key
:
"creatorUserId"
,
title
:
this
.
l
(
"creatorUserId"
),
align
:
"left"
,
high
:
true
,
type
:
'user'
},
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
),
align
:
"left"
,
high
:
true
,
},
{
{
title
:
'操作'
,
title
:
'操作'
,
key
:
'action'
,
key
:
'action'
,
...
...
pages/project/record/recordTimeLine.vue
0 → 100644
View file @
f77606a9
This diff is collapsed.
Click to expand it.
pages/project/task/add.vue
View file @
f77606a9
...
@@ -15,6 +15,11 @@
...
@@ -15,6 +15,11 @@
<UserSelect
ref=
"userSelected"
v-model=
"entity.userId"
/>
<UserSelect
ref=
"userSelected"
v-model=
"entity.userId"
/>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<FormItem
label=
"计划起止日期"
prop=
"date"
>
<DatePicker
type=
"datetimerange"
format=
"yyyy-MM-dd"
v-model=
"date"
placeholder=
"请选择时间范围"
@
on-change=
"changeFormat"
style=
"width: 300px"
></DatePicker>
</FormItem>
</Col>
<Col
:span=
"24"
>
<Col
:span=
"24"
>
<FormItem
:label=
"l('note')"
prop=
"note"
>
<FormItem
:label=
"l('note')"
prop=
"note"
>
<i-quill
v-model=
"entity.note"
:height=
"300"
v-paste=
"handleImg"
/>
<i-quill
v-model=
"entity.note"
:height=
"300"
v-paste=
"handleImg"
/>
...
@@ -40,29 +45,16 @@ export default {
...
@@ -40,29 +45,16 @@ export default {
return
{
return
{
disabled
:
false
,
disabled
:
false
,
entity
:
{
entity
:
{
creationTime
:
null
,
creatorUserId
:
null
,
lastModificationTime
:
null
,
lastModifierUserId
:
null
,
isDeleted
:
null
,
deletionTime
:
null
,
deleterUserId
:
null
,
title
:
""
,
title
:
""
,
planId
:
null
,
planId
:
''
,
projectId
:
null
,
projectId
:
''
,
level
:
null
,
level
:
null
,
status
:
null
,
status
:
null
,
projectTitle
:
""
,
planTitle
:
""
,
userIds
:
""
,
userIds
:
""
,
userId
:
""
,
userId
:
""
,
endDate
:
null
,
note
:
""
,
note
:
""
,
startDate
:
null
,
plansToStartDate
:
null
,
plansToStartDate
:
null
,
plansToEndTime
:
null
,
plansToEndTime
:
null
,
completePercentage
:
null
,
upTaskId
:
null
},
},
rules
:
{
rules
:
{
name
:
[{
name
:
[{
...
@@ -124,6 +116,10 @@ export default {
...
@@ -124,6 +116,10 @@ export default {
this
.
entity
.
id
=
0
;
this
.
entity
.
id
=
0
;
});
});
},
},
changeFormat
(
val
)
{
this
.
entity
.
plansToStartDate
=
val
[
0
];
this
.
entity
.
plansToEndTime
=
val
[
1
];
},
handleImg
(
e
)
{
handleImg
(
e
)
{
console
.
warn
(
e
)
console
.
warn
(
e
)
let
file
=
null
let
file
=
null
...
...
pages/project/task/detail.vue
View file @
f77606a9
<
template
>
<
template
>
<div
class=
"detail"
style=
"width:100%"
>
<div
class=
"detail"
style=
"width:100%;overflow:auto"
>
<Row
style=
"height:284px"
>
<div
style=
"width:80%; border-right:1px solid #ccc;padding-right:30px;float:left"
>
<Filed
:span=
"6"
:name=
"l('creationTime')"
>
{{
entity
.
creationTime
}}
</Filed>
<Row
style=
"height:284px"
>
<Filed
:span=
"6"
:name=
"l('creatorUserId')"
>
<Filed
:span=
"12"
:name=
"l('title')"
>
{{
entity
.
title
}}
</Filed>
<User
:value=
"entity.creatorUserId"
></User>
<Filed
:span=
"12"
:name=
"l('level')"
>
</Filed>
<state
code=
"project.task.level"
:value=
"entity.level"
type=
"text"
></state>
<Filed
:span=
"6"
:name=
"l('title')"
>
{{
entity
.
title
}}
</Filed>
</Filed>
<Filed
:span=
"6"
:name=
"l('level')"
>
<Filed
:span=
"12"
:name=
"l('status')"
>
<state
code=
"project.task.level"
:value=
"entity.level"
type=
"text"
></state>
<state
code=
"project.task.status"
:value=
"entity.status"
type=
"text"
></state>
</Filed>
</Filed>
<Filed
:span=
"6"
:name=
"l('status')"
>
<Filed
:span=
"12"
:name=
"l('userId')"
>
<state
code=
"project.task.status"
:value=
"entity.status"
type=
"text"
></state>
<User
:value=
"parseInt(entity.userId)"
></User>
</Filed>
</Filed>
<Filed
:span=
"6"
:name=
"l('userId')"
>
{{
entity
.
userId
}}
</Filed>
<Filed
:span=
"12"
name=
"计划起止日期"
>
<Filed
:span=
"6"
:name=
"l('endDate')"
>
{{
entity
.
endDate
}}
</Filed>
<TimeDifference
:timeValue=
"timeValuePlan"
:work=
"0"
></TimeDifference>
<Filed
:span=
"6"
:name=
"l('startDate')"
>
{{
entity
.
startDate
}}
</Filed>
</Filed>
<Filed
:span=
"24"
:name=
"l('note')"
>
<Filed
:span=
"12"
name=
"实际起止日期"
>
<div
style=
"height:200px"
v-html=
"entity.note"
class=
"tex_in10"
></div>
<TimeDifference
:timeValue=
"timeValue"
:work=
"1"
></TimeDifference>
</Filed>
</Filed>
</Row>
<component
:is=
"detail"
:eid=
"curId"
/>
<Filed
:span=
"24"
:name=
"l('note')"
>
<div
style=
"height:200px"
v-html=
"entity.note"
class=
"tex_in10"
></div>
</Filed>
<Filed
:span=
"12"
:name=
"l('creationTime')"
>
{{
entity
.
creationTime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('creatorUserId')"
>
<User
:value=
"entity.creatorUserId"
></User>
</Filed>
</Row>
</div>
<div
class=
"rightDiv"
:style=
"
{height:divHeight}">
<component
:is=
"detail"
:eid=
"curId"
/>
</div>
<FooterToolbar
class=
"ftball"
>
<div
class=
"tip"
><Button
type=
"primary"
@
click=
"updatepart(2)"
>
完成
</Button><Button
type=
"primary"
@
click=
"updatepart(3)"
>
冻结
</Button><Button
@
click=
"handleClose"
>
取消
</Button></div>
</FooterToolbar>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
Api
from
'./api'
import
Api
from
'./api'
import
ApiTask
from
'../task/api'
export
default
{
export
default
{
name
:
'Add'
,
name
:
'Add'
,
data
()
{
data
()
{
return
{
return
{
entity
:
{},
entity
:
{},
timeValue
:
{
startDate
:
""
,
endDate
:
""
,
},
timeValuePlan
:
{
startDate
:
""
,
endDate
:
""
,
},
divHeight
:
'200px'
,
rules
:
{
rules
:
{
name
:
[{
name
:
[{
required
:
true
,
required
:
true
,
...
@@ -49,10 +74,18 @@ export default {
...
@@ -49,10 +74,18 @@ export default {
props
:
{
props
:
{
eid
:
String
eid
:
String
},
},
created
()
{
this
.
divHeight
=
window
.
innerHeight
-
150
+
'px'
},
mounted
()
{
mounted
()
{
if
(
this
.
eid
!=
''
&&
this
.
eid
!=
null
)
{
if
(
this
.
eid
!=
''
&&
this
.
eid
!=
null
)
{
this
.
load
(
this
.
eid
);
this
.
load
(
this
.
eid
);
}
}
window
.
onresize
=
()
=>
{
return
(()
=>
{
this
.
divHeight
=
window
.
innerHeight
-
150
+
'px'
})()
}
},
},
methods
:
{
methods
:
{
load
(
v
)
{
load
(
v
)
{
...
@@ -60,12 +93,44 @@ export default {
...
@@ -60,12 +93,44 @@ export default {
id
:
v
id
:
v
}).
then
(
r
=>
{
}).
then
(
r
=>
{
this
.
entity
=
r
.
result
;
this
.
entity
=
r
.
result
;
this
.
$emit
(
'on-load'
)
this
.
timeValue
=
{
startDate
:
r
.
result
.
startDate
,
endDate
:
r
.
result
.
endDate
,
},
this
.
timeValuePlan
=
{
startDate
:
r
.
result
.
plansToStartDate
,
endDate
:
r
.
result
.
plansToEndTime
,
},
this
.
$emit
(
'on-load'
)
this
.
curId
=
v
this
.
curId
=
v
this
.
detail
=
()
=>
import
(
'../record/
index1
'
)
this
.
detail
=
()
=>
import
(
'../record/
recordTimeLine
'
)
})
})
},
},
updatepart
(
valStatus
)
{
let
params
=
{
id
:
this
.
eid
,
status
:
valStatus
}
if
(
valStatus
==
1
)
{
params
.
startDate
=
''
}
if
(
valStatus
==
2
)
{
params
.
endDate
=
''
}
ApiTask
.
updatepart
(
params
).
then
(
r
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'操作成功'
)
this
.
$emit
(
'on-ok'
)
}
else
{
this
.
$Message
.
error
(
'操作失败'
)
}
}).
catch
(
err
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
'操作失败'
)
console
.
warn
(
err
)
})
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
'on-close'
)
this
.
$emit
(
'on-close'
)
},
},
...
@@ -89,4 +154,11 @@ export default {
...
@@ -89,4 +154,11 @@ export default {
text-indent
:
12px
;
text-indent
:
12px
;
text-align
:
inherit
!important
;
text-align
:
inherit
!important
;
}
}
.rightDiv
{
width
:
18%
;
float
:
left
;
padding-left
:
50px
;
}
</
style
>
</
style
>
pages/project/task/index.vue
View file @
f77606a9
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
</a>
</a>
</div>
</div>
<Content
class=
"content"
:class=
"!showMenu?'con_bord':''"
>
<Content
class=
"content"
:class=
"!showMenu?'con_bord':''"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
:conditions=
"easySearch"
:lazy=
"true"
:set=
"false"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
:conditions=
"easySearch"
:lazy=
"true"
>
<template
slot=
"easySearch"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
inline
>
<Form
ref=
"formInline"
inline
>
<FormItem>
<FormItem>
...
@@ -145,7 +145,7 @@ export default {
...
@@ -145,7 +145,7 @@ export default {
oprate
:
'detail'
oprate
:
'detail'
},
},
on
:
{
on
:
{
click
:
()
=>
this
.
viewRecord
(
params
.
row
.
id
)
click
:
()
=>
this
.
viewRecord
(
params
.
row
.
id
,
params
.
row
.
status
)
}
}
},
params
.
row
.
title
)
},
params
.
row
.
title
)
}
}
...
@@ -155,29 +155,15 @@ export default {
...
@@ -155,29 +155,15 @@ export default {
title
:
this
.
l
(
"level"
),
title
:
this
.
l
(
"level"
),
align
:
"center"
,
align
:
"center"
,
high
:
true
,
high
:
true
,
width
:
80
,
code
:
'project.task.level'
code
:
'project.task.level'
},
},
{
key
:
"projectTitle"
,
title
:
this
.
l
(
"projectTitle"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
hide
:
true
,
},
{
key
:
"planTitle"
,
title
:
this
.
l
(
"planTitle"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
hide
:
true
,
},
{
{
key
:
"status"
,
key
:
"status"
,
title
:
this
.
l
(
"status"
),
title
:
this
.
l
(
"status"
),
align
:
"center"
,
align
:
"center"
,
high
:
true
,
high
:
true
,
width
:
120
,
code
:
'project.task.status'
code
:
'project.task.status'
},
},
...
@@ -190,21 +176,46 @@ export default {
...
@@ -190,21 +176,46 @@ export default {
},
},
{
{
key
:
"startDate"
,
key
:
"startDate"
,
title
:
this
.
l
(
"startDate"
)
,
title
:
'计划起止日期'
,
align
:
"center"
,
align
:
"center"
,
high
:
true
,
high
:
true
,
width
:
200
,
render
:
(
h
,
params
)
=>
{
return
h
(
'TimeDifference'
,
{
props
:
{
timeValue
:
{
startDate
:
params
.
row
.
plansToStartDate
,
endDate
:
params
.
row
.
plansToEndTime
,
},
work
:
0
}
})
}
},
},
{
{
key
:
"
end
Date"
,
key
:
"
start
Date"
,
title
:
this
.
l
(
"endDate"
)
,
title
:
'实际起止日期'
,
align
:
"center"
,
align
:
"center"
,
high
:
true
,
high
:
true
,
width
:
200
,
render
:
(
h
,
params
)
=>
{
return
h
(
'TimeDifference'
,
{
props
:
{
timeValue
:
{
startDate
:
params
.
row
.
startDate
,
endDate
:
params
.
row
.
endDate
,
},
work
:
1
}
})
}
},
},
{
{
key
:
"workHour"
,
key
:
"workHour"
,
title
:
this
.
l
(
"workHour"
),
title
:
this
.
l
(
"workHour"
),
align
:
"
center
"
,
align
:
"
right
"
,
high
:
true
,
high
:
true
,
width
:
80
,
render
:
(
h
,
params
)
=>
{
render
:
(
h
,
params
)
=>
{
return
h
(
'a'
,
{
return
h
(
'a'
,
{
attrs
:
{
attrs
:
{
...
@@ -223,21 +234,20 @@ export default {
...
@@ -223,21 +234,20 @@ export default {
high
:
true
,
high
:
true
,
hide
:
true
hide
:
true
},
},
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
),
align
:
"left"
,
high
:
true
,
hide
:
true
,
},
{
{
key
:
"creatorUserId"
,
key
:
"creatorUserId"
,
title
:
this
.
l
(
"creatorUserId"
),
title
:
this
.
l
(
"creatorUserId"
),
align
:
"left"
,
align
:
"left"
,
high
:
true
,
high
:
true
,
hide
:
true
,
type
:
'user'
type
:
'user'
},
},
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
),
align
:
"center"
,
high
:
true
,
width
:
150
,
},
{
{
title
:
'操作'
,
title
:
'操作'
,
key
:
'action'
,
key
:
'action'
,
...
@@ -253,33 +263,22 @@ export default {
...
@@ -253,33 +263,22 @@ export default {
type
:
"icon"
,
type
:
"icon"
,
oprate
:
"edit"
,
oprate
:
"edit"
,
title
:
params
.
row
.
status
==
0
?
"开始"
:
params
.
row
.
status
==
2
?
"继续"
:
''
,
title
:
params
.
row
.
status
==
0
?
"开始"
:
params
.
row
.
status
==
2
?
"继续"
:
''
,
//disable: (params.row.status == 0 || params.row.status == 2) ? false : true
disable
:
params
.
row
.
status
},
},
on
:
{
on
:
{
click
:
()
=>
this
.
updatepart
(
params
.
row
.
id
,
1
)
click
:
()
=>
this
.
updatepart
(
params
.
row
.
id
,
1
)
}
}
}),
}),
// h('op', {
// attrs: {
// icon: "ios-pause",
// type: "icon",
// title: "暂停",
// //disable: params.row.status == 1 ? false : true
// },
// on: {
// click: () => this.updatepart(params.row.id, 2)
// }
// }),
h
(
'op'
,
{
h
(
'op'
,
{
attrs
:
{
attrs
:
{
icon
:
"ios-alarm"
,
icon
:
"ios-alarm"
,
type
:
"icon"
,
type
:
"icon"
,
oprate
:
"edit"
,
oprate
:
"edit"
,
title
:
"完成"
,
title
:
"完成"
,
//disable: (params.row.status != 0 && params.row.status != 3) ? false : true
disable
:
params
.
row
.
status
==
1
?
0
:
1
},
},
on
:
{
on
:
{
click
:
()
=>
this
.
updatepart
(
params
.
row
.
id
,
3
)
click
:
()
=>
this
.
updatepart
(
params
.
row
.
id
,
2
)
}
}
}),
}),
h
(
'op'
,
{
h
(
'op'
,
{
...
@@ -288,7 +287,7 @@ export default {
...
@@ -288,7 +287,7 @@ export default {
type
:
"icon"
,
type
:
"icon"
,
oprate
:
"add"
,
oprate
:
"add"
,
title
:
"新增记录"
,
title
:
"新增记录"
,
// disable: (params.row.status != 3 && params.row.status != 4) ? false : true
disable
:
params
.
row
.
status
==
1
?
0
:
1
},
},
on
:
{
on
:
{
click
:
()
=>
this
.
addRecord
(
params
.
row
.
id
)
click
:
()
=>
this
.
addRecord
(
params
.
row
.
id
)
...
@@ -300,7 +299,7 @@ export default {
...
@@ -300,7 +299,7 @@ export default {
type
:
"icon"
,
type
:
"icon"
,
oprate
:
"edit"
,
oprate
:
"edit"
,
title
:
"修改"
,
title
:
"修改"
,
//disable: (params.row.status == 0 || params.row.status == 2) ? false : true
disable
:
params
.
row
.
status
},
},
on
:
{
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
...
@@ -312,7 +311,7 @@ export default {
...
@@ -312,7 +311,7 @@ export default {
type
:
"icon"
,
type
:
"icon"
,
title
:
"删除"
,
title
:
"删除"
,
oprate
:
'delete'
,
oprate
:
'delete'
,
// disable: (params.row.status == 0 || params.row.status == 3) ? false : true
disable
:
params
.
row
.
status
},
},
on
:
{
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
...
@@ -439,6 +438,12 @@ export default {
...
@@ -439,6 +438,12 @@ export default {
id
:
valId
,
id
:
valId
,
status
:
valStatus
status
:
valStatus
}
}
if
(
valStatus
==
1
)
{
params
.
startDate
=
''
}
if
(
valStatus
==
2
)
{
params
.
endDate
=
''
}
Api
.
updatepart
(
params
).
then
(
r
=>
{
Api
.
updatepart
(
params
).
then
(
r
=>
{
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
$refs
.
grid
.
load
();
...
@@ -455,8 +460,9 @@ export default {
...
@@ -455,8 +460,9 @@ export default {
onSelect
(
val
)
{
onSelect
(
val
)
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
)
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
)
},
},
viewRecord
(
id
)
{
viewRecord
(
id
,
status
)
{
this
.
curId
=
id
;
this
.
curId
=
id
;
this
.
tastkStatus
=
status
;
this
.
title
=
"查看记录"
;
this
.
title
=
"查看记录"
;
this
.
fullScreen
=
true
;
this
.
fullScreen
=
true
;
this
.
detail
=
()
=>
import
(
'./detail'
)
this
.
detail
=
()
=>
import
(
'./detail'
)
...
...
plugins/iview.js
View file @
f77606a9
...
@@ -76,7 +76,7 @@ import InputCode from '@/components/page/inputCode.vue'
...
@@ -76,7 +76,7 @@ import InputCode from '@/components/page/inputCode.vue'
import
Pictrue
from
'@/components/page/pictrue.vue'
import
Pictrue
from
'@/components/page/pictrue.vue'
import
WordTree
from
'@/components/page/wordTree.vue'
import
WordTree
from
'@/components/page/wordTree.vue'
import
Actions
from
'@/components/page/actions.vue'
import
Actions
from
'@/components/page/actions.vue'
import
TimeDifference
from
'@/components/page/timeDifferenc
e.vue'
import
DateDRange
from
'@/components/page/dateRang
e.vue'
import
FilesViewer
from
'@/components/page/filesViewer.vue'
import
FilesViewer
from
'@/components/page/filesViewer.vue'
...
@@ -158,7 +158,7 @@ Vue.component("InputCode", InputCode)
...
@@ -158,7 +158,7 @@ Vue.component("InputCode", InputCode)
Vue
.
component
(
"Pictrue"
,
Pictrue
)
Vue
.
component
(
"Pictrue"
,
Pictrue
)
Vue
.
component
(
"WordTree"
,
WordTree
)
Vue
.
component
(
"WordTree"
,
WordTree
)
Vue
.
component
(
"Actions"
,
Actions
)
Vue
.
component
(
"Actions"
,
Actions
)
Vue
.
component
(
"
TimeDifference"
,
TimeDifferenc
e
)
Vue
.
component
(
"
DateDRange"
,
DateDRang
e
)
Vue
.
component
(
"Life"
,
Life
)
Vue
.
component
(
"Life"
,
Life
)
Vue
.
component
(
"FilesViewer"
,
FilesViewer
)
Vue
.
component
(
"FilesViewer"
,
FilesViewer
)
...
...
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