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
7e2917fa
Commit
7e2917fa
authored
May 14, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product' of git.mes123.com:zhouyx/mes-ui into product-rjt
parents
1366a5c3
fe1902fd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
84 additions
and
20 deletions
+84
-20
gantt.vue
pages/aps/results/gantt.vue
+73
-12
index.vue
pages/aps/results/index.vue
+11
-8
No files found.
pages/aps/results/gantt.vue
View file @
7e2917fa
...
...
@@ -21,7 +21,7 @@
import
GanttElastic
from
"gantt-elastic"
;
import
GanttHeader
from
"./components/gantt-header"
;
import
dayjs
from
"dayjs"
;
import
Api
from
"./api"
;
// just helper to get current dates
function
getDate
(
hours
)
{
const
currentDate
=
new
Date
();
...
...
@@ -273,17 +273,18 @@ let options = {
value
:
"label"
,
width
:
200
,
expander
:
true
,
html
:
true
,
events
:
{
click
({
data
,
column
})
{
alert
(
"description clicked!
\n
"
+
data
.
label
);
}
}
html
:
true
//
events: {
//
click({ data, column }) {
//
alert("description clicked!\n" + data.label);
//
}
//
}
},
{
id
:
3
,
label
:
"
责任人
"
,
label
:
"
设备编号
"
,
value
:
"user"
,
width
:
130
,
html
:
true
},
...
...
@@ -295,12 +296,25 @@ let options = {
},
{
id
:
5
,
label
:
"
类型
"
,
value
:
"type"
,
width
:
6
8
label
:
"
结束时间
"
,
value
:
task
=>
dayjs
(
task
.
endTime
).
format
(
"YYYY-MM-DD"
)
,
width
:
7
8
},
{
id
:
6
,
label
:
"投入数量"
,
value
:
"put_into_qty"
,
width
:
68
},
{
id
:
7
,
label
:
"派工数量"
,
value
:
"dispatch_qty"
,
width
:
68
},
{
id
:
8
,
label
:
"%"
,
value
:
"progress"
,
width
:
35
,
...
...
@@ -349,15 +363,60 @@ export default {
GanttElastic
,
GanttHeader
},
props
:
{
id
:
String
},
data
()
{
return
{
tasks
,
tasks
:[]
,
options
,
dynamicStyle
:
{},
lastId
:
16
};
},
mounted
()
{
this
.
gantData
();
},
methods
:
{
gantData
()
{
if
(
this
.
id
)
{
Api
.
paged
({
scheduleId
:
this
.
id
})
.
then
(
r
=>
{
if
(
r
.
result
)
{
Api
.
getdetail
({
part_task_pk
:
r
.
result
[
0
].
id
,
scheduleId
:
this
.
id
}).
then
(
r
=>
{
if
(
r
.
result
)
{
var
list
=
[];
for
(
var
i
=
0
;
i
<
r
.
result
.
length
;
i
++
)
{
let
temp
=
{
id
:
r
.
result
[
i
].
op_task_pk
,
label
:
r
.
result
[
i
].
task_name
,
user
:
r
.
result
[
i
].
equip_id
,
// start: r.result[i].plan_start,
// endTime: r.result[i].plan_finish,
endTime
:
"2020-7-30"
,
start
:
getDate
(
1
),
duration
:
(
15
*
i
)
*
24
*
60
*
60
*
1000
,
percent
:
85
,
put_into_qty
:
r
.
result
[
i
].
put_into_qty
,
dispatch_qty
:
r
.
result
[
i
].
dispatch_qty
};
list
.
push
(
temp
);
}
this
.
tasksUpdate
(
list
);
}
});
}
})
.
catch
(
error
=>
{
this
.
$Message
.
error
(
"请求失败"
);
});
}
},
addTask
()
{
this
.
tasks
.
push
({
id
:
this
.
lastId
++
,
...
...
@@ -372,9 +431,11 @@ export default {
});
},
tasksUpdate
(
tasks
)
{
// console.log(tasks);
this
.
tasks
=
tasks
;
},
optionsUpdate
(
options
)
{
// console.log(options);
this
.
options
=
options
;
},
styleUpdate
(
style
)
{
...
...
pages/aps/results/index.vue
View file @
7e2917fa
...
...
@@ -50,22 +50,23 @@
<Button
type=
"default"
@
click=
"cancel"
>
取消
</Button>
</div>
<Modal
v-model=
"modal1Gant"
fullscreen
title=
"甘特图"
footer-hide
>
<Gantt
/>
<!--
<Gantt
:id=
"id"
/>
-->
<gantt
:is=
"gantt"
:id=
"id"
/>
</Modal>
</div>
</
template
>
<
script
>
import
Api
from
"./api"
;
import
Gantt
from
"./gantt"
;
//
import Gantt from "./gantt";
export
default
{
components
:
{
Gantt
},
//
components: {
//
Gantt
//
},
data
()
{
return
{
curId
:
null
,
detail
:
null
,
isactive
:
0
,
isactive
:
null
,
list
:
[],
name
:
"name1"
,
id
:
null
,
...
...
@@ -75,7 +76,8 @@ export default {
showFooter
:
false
,
total
:
0
,
blacks
:
false
,
gant
:
false
gant
:
false
,
gantt
:
null
,
};
},
async
fetch
({
store
,
params
})
{
...
...
@@ -152,10 +154,11 @@ export default {
//甘特图
gantChart
()
{
this
.
modal1Gant
=
true
;
this
.
gantt
=
()
=>
import
(
"./gantt"
);
},
changeCheck
(
item
)
{
this
.
isactive
=
null
;
this
.
blacks
=
true
;
(
this
.
id
=
null
),
(
this
.
blacks
=
true
)
;
if
(
item
.
checked
==
true
)
{
this
.
contrastList
.
push
(
item
.
schedule_Id
);
}
else
if
(
item
.
checked
==
false
)
{
...
...
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