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
166767db
Commit
166767db
authored
Oct 30, 2020
by
周远喜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
时间控件修改
parent
2c8fbb84
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
288 additions
and
238 deletions
+288
-238
dateRange.vue
components/page/dateRange.vue
+3
-3
userGroup.vue
components/page/userGroup.vue
+95
-61
edit.vue
pages/project/plan/edit.vue
+1
-0
index.vue
pages/project/plan/index.vue
+130
-114
add.vue
pages/project/project/add.vue
+2
-8
detail.vue
pages/project/project/detail.vue
+1
-1
edit.vue
pages/project/project/edit.vue
+1
-8
index.vue
pages/project/project/index.vue
+36
-24
add.vue
pages/project/record/add.vue
+0
-6
add.vue
pages/project/task/add.vue
+5
-3
edit.vue
pages/project/task/edit.vue
+10
-6
index.vue
pages/project/task/index.vue
+4
-4
No files found.
components/page/dateRange.vue
View file @
166767db
...
...
@@ -119,9 +119,9 @@ export default {
}
},
watch
:
{
value
(
v
){
this
.
value
=
[
v
[
this
.
start
],
v
[
this
.
end
]]
}
//
value(v){
//
this.value=[v[this.start],v[this.end]]
//
}
},
};
</
script
>
...
...
components/page/userGroup.vue
View file @
166767db
<
template
>
<div>
<Select
:placeholder=
"placeholder"
v-model=
"name"
@
on-change=
"change"
:multiple=
"multiple"
clearable
filterable
transfer
>
<Option
v-for=
"item in users"
:value=
"item.userId"
:key=
"item.userId"
:label=
"item.note"
:disabled=
"item.status==0"
>
<div
class=
"user"
>
<State
code=
"project.group.authority"
:value=
"item.authority"
class=
"mr10"
type=
"tag"
/>
{{
item
.
note
}}
<State
code=
"project.group.role"
:value=
"item.role"
class=
"mr10"
type=
"tag"
/>
</div>
</Option>
<div>
<Select
:placeholder=
"placeholder"
v-model=
"name"
@
on-change=
"change"
:multiple=
"multiple"
clearable
filterable
transfer
>
<Option
v-for=
"item in users"
:value=
"item.userId"
:key=
"item.userId"
:label=
"item.note"
:disabled=
"item.status == 0"
>
<div
class=
"user"
>
<State
code=
"project.group.authority"
:value=
"item.authority"
class=
"mr10"
type=
"tag"
/>
{{
item
.
note
}}
<State
code=
"project.group.role"
:value=
"item.role"
class=
"mr10"
type=
"tag"
/>
</div>
</Option>
</Select>
</div>
</div>
</
template
>
<
script
>
export
default
{
model
:
{
prop
:
"value"
,
event
:
"on-change"
,
model
:
{
prop
:
"value"
,
event
:
"on-change"
,
},
data
()
{
return
{
name
:
this
.
value
,
users
:
this
.
data
,
};
},
created
()
{
this
.
load
();
},
props
:
{
value
:
[
String
,
Number
,
Array
],
placeholder
:
{
type
:
String
,
default
:
"请选择人员"
,
},
data
()
{
return
{
name
:
this
.
value
,
users
:
this
.
data
,
};
},
created
()
{
this
.
load
();
multiple
:
{
type
:
Boolean
,
default
:
false
,
},
props
:
{
value
:
[
String
,
Number
,
Array
],
placeholder
:
{
type
:
String
,
default
:
"请选择人员"
,
},
multiple
:
{
type
:
Boolean
,
default
:
false
,
},
projectId
:
{
type
:
String
}
projectId
:
{
type
:
String
,
},
methods
:
{
load
()
{
var
params
=
{
conditions
:
[{
fieldName
:
"projectId"
,
fieldValue
:
this
.
projectId
,
conditionalType
:
"Equal"
}]
}
//
this
.
$api
.
post
(
`
${
material
}
/projectgroupuser/list`
,
params
).
then
(
r
=>
{
this
.
users
=
r
.
result
;
})
},
change
(
event
)
{
let
name
=
""
;
this
.
users
.
forEach
((
e
)
=>
{
if
(
e
.
id
==
event
)
{
name
=
e
.
label
;
}
});
this
.
$emit
(
"on-change"
,
event
,
name
);
},
// 加载人员
},
methods
:
{
load
()
{
if
(
this
.
projectId
)
{
var
params
=
{
conditions
:
[
{
fieldName
:
"projectId"
,
fieldValue
:
this
.
projectId
,
conditionalType
:
"Equal"
,
},
],
};
//
this
.
$api
.
post
(
`
${
material
}
/projectgroupuser/list`
,
params
)
.
then
((
r
)
=>
{
this
.
users
=
r
.
result
;
});
}
},
watch
:
{
projectId
(
v
){
this
.
load
();
change
(
event
)
{
let
name
=
""
;
this
.
users
.
forEach
((
e
)
=>
{
if
(
e
.
id
==
event
)
{
name
=
e
.
label
;
}
});
this
.
$emit
(
"on-change"
,
event
,
name
);
},
// 加载人员
},
watch
:
{
projectId
(
v
)
{
if
(
v
)
{
this
.
load
();
}
},
},
};
</
script
>
<
style
lang=
"less"
>
@import "../../assets/css/custom.less";
.userGroup {}
.userGroup {
}
</
style
>
pages/project/plan/edit.vue
View file @
166767db
...
...
@@ -148,6 +148,7 @@ export default {
},
props
:
{
eid
:
[
Number
,
String
],
v
:
Object
},
mounted
()
{
if
(
this
.
eid
)
{
...
...
pages/project/plan/index.vue
View file @
166767db
<
template
>
<div>
<Card>
<EditGrid
:columns=
"columns"
ref=
"grid"
:items=
"list"
>
<template
slot=
"easySearch"
><Form
ref=
"formInline"
:model=
"easySearch"
inline
><FormItem
prop=
"keys"
><Input
placeholder=
"请输入关键字标题"
v-model=
"easySearch.keys.value"
/>
</FormItem>
<FormItem><Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
</FormItem>
</Form></
template
>
<EditGrid
:columns=
"columns"
ref=
"grid"
:items=
"list"
>
<template
slot=
"easySearch"
><Form
ref=
"formInline"
:model=
"easySearch"
inline
><FormItem
prop=
"keys"
><Input
placeholder=
"请输入关键字标题"
v-model=
"easySearch.keys.value"
/>
</FormItem>
<FormItem
><Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
</FormItem>
</Form></
template
>
<!-- <template slot="searchForm">
<Search />
</template> -->
...
...
@@ -15,7 +24,13 @@
</EditGrid>
</Card>
<Modal
v-model=
"modal"
:title=
"title"
width=
"1200"
footer-hide
>
<component
:is=
"detail"
:eid=
"curId"
:v=
"row"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
<component
:is=
"detail"
:eid=
"curId"
:v=
"row"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
</Modal>
</div>
</template>
...
...
@@ -32,24 +47,24 @@ export default {
author
:
"henq"
,
description
:
"project_plan 10/19/2020 10:23:07 AM"
,
},
props
:{
eid
:{
type
:
String
props
:
{
eid
:
{
type
:
String
,
},
data
:{
type
:
Object
,
default
:
()
=>
{
data
:
{
type
:
Object
,
default
:
()
=>
{
return
{
id
:
"33930562-a9f7-bd95-88ab-d01eb1c4c369"
,
title
:
"示例项目"
}
}
}
id
:
"33930562-a9f7-bd95-88ab-d01eb1c4c369"
,
title
:
"示例项目"
,
}
;
}
,
}
,
},
data
()
{
return
{
entity
:{},
row
:{},
entity
:
{},
row
:
{},
action
:
Api
.
index
,
easySearch
:
{
keys
:
{
op
:
"title"
,
value
:
null
},
...
...
@@ -57,7 +72,7 @@ export default {
modal
:
false
,
title
:
"新增"
,
detail
:
null
,
curId
:
null
,
curId
:
null
,
list
:
[],
columns
:
[
// { key:"id",title:this.$t("id") ,hide:true ,align:"left" ,high:true },
...
...
@@ -71,23 +86,23 @@ export default {
// { key:"projectId",title:this.l("projectId") ,align:"left" ,high:true },
// { key:"upId",title:this.l("upId") ,align:"left" ,high:true },
// { type: "selection", width: 80, align: "center" },
{
{
key
:
"type"
,
width
:
90
,
title
:
this
.
l
(
"type"
),
align
:
"center"
,
high
:
true
,
code
:
"mes.project_plan.Type"
,
attr
:{
type
:
'icon'
}
attr
:
{
type
:
"icon"
,
}
,
},
{
{
key
:
"direction"
,
title
:
this
.
l
(
"direction"
),
align
:
"center"
,
code
:
"mes.project_plan.direction"
,
width
:
80
,
width
:
80
,
easy
:
true
,
high
:
true
,
},
...
...
@@ -98,12 +113,12 @@ export default {
tree
:
true
,
easy
:
true
,
high
:
true
,
},
},
{
key
:
"status"
,
title
:
this
.
l
(
"status"
),
align
:
"center"
,
width
:
80
,
width
:
80
,
high
:
true
,
code
:
"mes.project_plan.Status"
,
},
...
...
@@ -112,16 +127,22 @@ export default {
// title: this.l("startDate"),
// align: "left",
// high: true
// ,type:"date"
// ,type:"date"
// },
// { key: "endDate", title: this.l("endDate"), align: "left", high: true,type:"date" },
{
key
:
"endDate"
,
width
:
250
,
title
:
"计划日期"
,
align
:
"left"
,
render
(
h
,
param
)
{
return
h
(
'DateRange'
,{
attrs
:{
value
:
param
.
row
}
})
},
},
{
key
:
"endDate"
,
width
:
250
,
title
:
"计划日期"
,
align
:
"center"
,
render
(
h
,
param
)
{
return
h
(
"DateRange"
,
{
attrs
:
{
value
:
param
.
row
,
},
});
},
},
// {
// key: "attachment",
// title: this.l("attachment"),
...
...
@@ -133,18 +154,18 @@ export default {
title
:
this
.
l
(
"executor"
),
align
:
"left"
,
high
:
true
,
type
:
"users"
,
type
:
"users"
,
},
{
{
key
:
"deliverable"
,
title
:
this
.
l
(
"deliverable"
),
code
:
"mes.project_plan.deliverable"
,
width
:
80
,
code
:
"mes.project_plan.deliverable"
,
width
:
80
,
align
:
"center"
,
easy
:
true
,
high
:
true
,
},
{
{
title
:
"操作"
,
key
:
"action"
,
width
:
150
,
...
...
@@ -162,60 +183,53 @@ export default {
// }
// )
// }
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"op"
,
{
attrs
:
{
icon
:
"md-arrow-dropright-circle"
,
h
(
"op"
,
{
attrs
:
{
icon
:
"md-arrow-dropright-circle"
,
type
:
"icon"
,
title
:
"派发"
,
oprate
:
"edit"
,
disable
:
params
.
row
.
status
!=
0
},
on
:
{
click
:
()
=>
this
.
send
(
params
.
row
)
},
disable
:
params
.
row
.
status
!=
0
,
},
)
,
h
(
"op"
,
{
attrs
:
{
icon
:
"md-add"
,
on
:
{
click
:
()
=>
this
.
send
(
params
.
row
)
}
,
}),
h
(
"op"
,
{
attrs
:
{
icon
:
"md-add"
,
type
:
"icon"
,
title
:
"新增子任务"
,
disable
:
params
.
row
.
status
>
1
,
oprate
:
"edit"
,},
on
:
{
click
:
()
=>
this
.
add
(
params
.
row
)
},
}
),
h
(
"op"
,
{
attrs
:
{
icon
:
"md-create"
,
disable
:
params
.
row
.
status
>
1
,
oprate
:
"edit"
,
},
on
:
{
click
:
()
=>
this
.
add
(
params
.
row
)
},
}),
h
(
"op"
,
{
attrs
:
{
icon
:
"md-create"
,
type
:
"icon"
,
title
:
"编辑"
,
oprate
:
"edit"
,
disable
:
params
.
row
.
status
!==
0
,
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
},
}
),
h
(
"op"
,
{
attrs
:
{
icon
:
"ios-trash"
,
oprate
:
"edit"
,
disable
:
params
.
row
.
status
!==
0
,
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
)
},
}),
h
(
"op"
,
{
attrs
:
{
icon
:
"ios-trash"
,
type
:
"icon"
,
title
:
"删除"
,
oprate
:
"delete"
,
disable
:
params
.
row
.
status
!==
0
,
msg
:
"确认要删除吗?"
}
,
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
},
}
),
disable
:
params
.
row
.
status
!==
0
,
msg
:
"确认要删除吗?"
,
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
},
}
),
]);
},
},
],
};
},
...
...
@@ -235,15 +249,17 @@ export default {
search
()
{
// this.$refs.grid.reload(this.easySearch);
var
params
=
{
conditions
:
[{
fieldName
:
"projectId"
,
conditionalType
:
'Equal'
,
fieldValue
:
this
.
eid
}],
conditions
:
[
{
fieldName
:
"projectId"
,
conditionalType
:
"Equal"
,
fieldValue
:
this
.
eid
,
},
],
// conditions: []
};
Api
.
list
(
params
).
then
((
r
)
=>
{
let
res
=
r
.
result
;
let
res
=
r
.
result
;
var
data
=
this
.
$u
.
toTree
(
res
,
null
,
...
...
@@ -255,54 +271,53 @@ export default {
},
"upId"
);
this
.
list
=
data
;
this
.
list
=
data
;
});
},
add
(
row
)
{
if
(
row
)
{
this
.
curId
=
row
.
id
;
this
.
row
=
row
}
else
{
this
.
curId
=
null
;
this
.
row
=
{
projectId
:
this
.
data
.
id
}
if
(
row
)
{
this
.
curId
=
row
.
id
;
this
.
row
=
row
;
}
else
{
this
.
curId
=
null
;
this
.
row
=
{
projectId
:
this
.
data
.
id
,
};
}
this
.
title
=
"新增"
;
this
.
detail
=
()
=>
import
(
"./add"
);
this
.
modal
=
true
;
},
send
(
row
){
send
(
row
)
{
console
.
log
(
row
);
if
(
!
row
.
startDate
)
{
if
(
!
row
.
startDate
)
{
this
.
$Message
.
error
(
"未设置开始时间"
);
return
return
;
}
if
(
!
row
.
endDate
)
{
if
(
!
row
.
endDate
)
{
this
.
$Message
.
error
(
"未设置结束时间"
);
return
return
;
}
if
(
row
.
executor
.
length
==
0
)
{
if
(
row
.
executor
.
length
==
0
)
{
this
.
$Message
.
error
(
"请设置执行人"
);
return
return
;
}
delete
row
.
chlidren
;
delete
row
.
chlidren
;
delete
row
.
parent
;
console
.
warn
(
row
)
row
.
status
=
1
;
console
.
warn
(
row
)
;
row
.
status
=
1
;
Api
.
sendtask
({
id
:
row
.
id
,
status
:
1
,
}).
then
(
r
=>
{
if
(
r
.
success
)
{
id
:
row
.
id
,
status
:
1
,
}).
then
(
(
r
)
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
info
(
"任务派发成功!"
);
this
.
search
();
}
})
})
;
},
copy
(
id
)
{
this
.
curId
=
id
;
...
...
@@ -316,8 +331,9 @@ export default {
this
.
detail
=
()
=>
import
(
"./detail"
);
this
.
modal
=
true
;
},
edit
(
id
)
{
this
.
curId
=
id
;
edit
(
row
)
{
this
.
curId
=
row
.
id
;
this
.
row
=
row
;
this
.
title
=
"编辑"
;
this
.
detail
=
()
=>
import
(
"./edit"
);
this
.
modal
=
true
;
...
...
pages/project/project/add.vue
View file @
166767db
...
...
@@ -79,14 +79,8 @@
></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
<DateRange
v-model=
"entity"
edit
></DateRange>
</FormItem
></Col>
<Col
:span=
"12"
...
...
pages/project/project/detail.vue
View file @
166767db
...
...
@@ -26,7 +26,7 @@
</li>
<li>
<a
@
click=
"template"
>
<Icon
type=
"ios-photos"
/>
模版
<Icon
type=
"ios-photos"
/>
目录
</a>
<span>
|
</span>
...
...
pages/project/project/edit.vue
View file @
166767db
...
...
@@ -35,14 +35,7 @@
></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
<DateRange
v-model=
"entity"
edit
></DateRange>
</FormItem
></Col>
<!--
<Col
:span=
"12"
><FormItem
:label=
"l('startDate')"
prop=
"startDate"
>
...
...
pages/project/project/index.vue
View file @
166767db
...
...
@@ -278,35 +278,47 @@ export default {
// high: true,
// code: "mes.project_main.Phase",
// },
{
key
:
"startDate"
,
title
:
this
.
l
(
"startDate"
),
align
:
"center"
,
high
:
true
,
render
:
(
h
,
params
)
=>
{
return
h
(
"span"
,
params
.
row
.
startDate
?
this
.
sliceStr
(
params
.
row
.
startDate
+
" "
,
0
,
10
)
:
""
);
},
},
// {
// key: "startDate",
// title: this.l("startDate"),
// align: "center",
// high: true,
// render: (h, params) => {
// return h(
// "span",
// params.row.startDate
// ? this.sliceStr(params.row.startDate + " ", 0, 10)
// : ""
// );
// },
// },
// {
// key: "endDate",
// title: this.l("endDate"),
// align: "center",
// high: true,
// render: (h, params) => {
// return h(
// "span",
// params.row.endDate
// ? this.sliceStr(params.row.endDate + " ", 0, 10)
// : ""
// );
// },
// },
{
key
:
"endDate"
,
title
:
this
.
l
(
"endDate"
),
width
:
250
,
title
:
"计划日期"
,
align
:
"center"
,
high
:
true
,
render
:
(
h
,
params
)
=>
{
return
h
(
"span"
,
params
.
row
.
endDate
?
this
.
sliceStr
(
params
.
row
.
endDate
+
" "
,
0
,
10
)
:
""
);
render
(
h
,
param
)
{
return
h
(
"DateRange"
,
{
attrs
:
{
value
:
param
.
row
,
},
});
},
},
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
),
...
...
pages/project/record/add.vue
View file @
166767db
...
...
@@ -59,12 +59,6 @@ export default {
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
workHour
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
,
type
:
"number"
}]
}
}
...
...
pages/project/task/add.vue
View file @
166767db
...
...
@@ -17,7 +17,7 @@
</Col>
<Col
:span=
"12"
>
<FormItem
label=
"计划日期"
prop=
"date"
>
<DatePicker
type=
"datetimerange"
format=
"yyyy-MM-dd"
placeholder=
"请选择时间范围"
@
on-change=
"changeFormat"
style=
"width: 300px"
></DatePicker
>
<DateRange
v-model=
"entity"
edit
></DateRange
>
</FormItem>
</Col>
<Col
:span=
"24"
>
...
...
@@ -53,8 +53,10 @@ export default {
userIds
:
""
,
userId
:
""
,
note
:
""
,
plansToStartDate
:
null
,
plansToEndTime
:
null
,
startDate
:
null
,
endDate
:
null
,
// plansToStartDate: null,
// plansToEndTime: null,
},
rules
:
{
name
:
[{
...
...
pages/project/task/edit.vue
View file @
166767db
...
...
@@ -17,7 +17,7 @@
</Col>
<Col
:span=
"12"
>
<FormItem
label=
"计划日期"
prop=
"date"
>
<DatePicker
type=
"datetimerange"
format=
"yyyy-MM-dd"
placeholder=
"请选择时间范围"
v-model=
"planDate"
@
on-change=
"changeFormat"
style=
"width: 300px"
></DatePicker
>
<DateRange
v-model=
"entity"
edit
></DateRange
>
</FormItem>
</Col>
<Col
:span=
"24"
>
...
...
@@ -47,7 +47,10 @@ export default {
data
()
{
return
{
disabled
:
false
,
entity
:
{},
entity
:
{
startDate
:
null
,
endDate
:
null
,
},
planDate
:
[],
rules
:
{
name
:
[{
...
...
@@ -65,7 +68,8 @@ export default {
}
},
props
:
{
eid
:
String
eid
:
String
,
row
:
Object
,
},
mounted
()
{
if
(
this
.
eid
!=
''
&&
this
.
eid
!=
null
)
{
...
...
@@ -79,9 +83,9 @@ export default {
}).
then
(
r
=>
{
this
.
entity
=
r
.
result
;
this
.
entity
.
userId
=
parseInt
(
r
.
result
.
userId
)
if
(
r
.
result
.
plansToStartDate
&&
r
.
result
.
plansToStartDate
!=
''
&&
r
.
result
.
plansToEndTime
&&
r
.
result
.
plansToEndTime
!=
''
)
{
this
.
planDate
=
[
r
.
result
.
plansToStartDate
,
r
.
result
.
plansToEndTime
]
}
//
if (r.result.plansToStartDate && r.result.plansToStartDate != '' && r.result.plansToEndTime && r.result.plansToEndTime != '') {
//
this.planDate = [r.result.plansToStartDate, r.result.plansToEndTime]
//
}
})
},
handleSubmit
()
{
...
...
pages/project/task/index.vue
View file @
166767db
...
...
@@ -167,7 +167,7 @@ export default {
},
{
key
:
"startDate"
,
title
:
'
实际
日期'
,
title
:
'
计划
日期'
,
align
:
"center"
,
high
:
true
,
width
:
280
,
...
...
@@ -181,7 +181,7 @@ export default {
},
{
key
:
"startDate"
,
title
:
'
计划
日期'
,
title
:
'
执行
日期'
,
align
:
"center"
,
high
:
true
,
width
:
280
,
...
...
@@ -189,8 +189,8 @@ export default {
return
h
(
'DateRange'
,
{
props
:
{
value
:
params
.
row
,
start
:
"
plansTo
StartDate"
,
end
:
"
plansToEndTim
e"
,
start
:
"
run
StartDate"
,
end
:
"
runEndDat
e"
,
}
})
}
...
...
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