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
Expand all
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
This diff is collapsed.
Click to expand it.
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