Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TF-MOM-WEB
Project
Project
Details
Activity
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
TFMOM
TF-MOM-WEB
Commits
0529a544
Commit
0529a544
authored
Aug 03, 2023
by
arvin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
甘特图站位路线
parent
b751f88f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
985 additions
and
944 deletions
+985
-944
export.js
...ications/architecture-dee/public/gantt_codebase/export.js
+890
-914
package.json
applications/dee-mes/package.json
+1
-0
config.js
...mes/src/privateComponents/components/MBOMConfig/config.js
+3
-3
data.js
...e-mes/src/privateComponents/components/MBOMConfig/data.js
+0
-8
gatt.vue
...-mes/src/privateComponents/components/MBOMConfig/gatt.vue
+7
-7
step.vue
...-mes/src/privateComponents/components/MBOMConfig/step.vue
+84
-12
No files found.
applications/architecture-dee/public/gantt_codebase/export.js
View file @
0529a544
This diff is collapsed.
Click to expand it.
applications/dee-mes/package.json
View file @
0529a544
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
"dependencies"
:
{
"dependencies"
:
{
"axios"
:
"^0.19.2"
,
"axios"
:
"^0.19.2"
,
"bpmn-js"
:
"^7.0.0"
,
"bpmn-js"
:
"^7.0.0"
,
"csv-exportor"
:
"^1.0.2"
,
"camunda-bpmn-moddle"
:
"^4.4.0"
,
"camunda-bpmn-moddle"
:
"^4.4.0"
,
"lodash.foreach"
:
"^4.5.0"
,
"lodash.foreach"
:
"^4.5.0"
,
"moment"
:
"^2.26.0"
,
"moment"
:
"^2.26.0"
,
...
...
applications/dee-mes/src/privateComponents/components/MBOMConfig/config.js
View file @
0529a544
...
@@ -5,14 +5,14 @@ export default {
...
@@ -5,14 +5,14 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
this
.
initGantt
()
this
.
gantt
&&
this
.
initGantt
()
},
},
methods
:
{
methods
:
{
initGantt
()
{
initGantt
()
{
this
.
setColumnsConfig
()
this
.
setColumnsConfig
()
this
.
configLayout
()
this
.
usePlugins
()
this
.
gantt
.
init
(
this
.
ganttElId
)
this
.
gantt
.
i18n
.
setLocale
(
'cn'
)
this
.
gantt
.
i18n
.
setLocale
(
'cn'
)
this
.
configLayout
()
},
},
setColumnsConfig
()
{
setColumnsConfig
()
{
this
.
gantt
.
config
.
columns
=
this
.
columns
this
.
gantt
.
config
.
columns
=
this
.
columns
...
...
applications/dee-mes/src/privateComponents/components/MBOMConfig/data.js
View file @
0529a544
...
@@ -33,15 +33,7 @@ export default {
...
@@ -33,15 +33,7 @@ export default {
},
},
methods
:
{
methods
:
{
search
()
{
},
export
()
{
},
save
()
{
}
}
}
}
}
applications/dee-mes/src/privateComponents/components/MBOMConfig/gatt.vue
View file @
0529a544
...
@@ -9,9 +9,9 @@
...
@@ -9,9 +9,9 @@
<dee-tools
mode=
"normal"
:tools=
"tools"
/>
<dee-tools
mode=
"normal"
:tools=
"tools"
/>
</div>
</div>
<div
class=
"content-model"
>
<div
class=
"content-model"
>
<step
v-show=
"viewType === 'ExtPosition'"
:show-flag=
"viewType === 'ExtPosition'"
:node=
"node"
/>
<step
ref=
"ExtPosition"
v-show=
"viewType === 'ExtPosition'"
:show-flag=
"viewType === 'ExtPosition'"
:node=
"node"
/>
<unit
v-show=
"viewType === 'unit'"
:show-flag=
"viewType === 'unit'"
:node=
"node"
/>
<unit
ref=
"unit"
v-show=
"viewType === 'unit'"
:show-flag=
"viewType === 'unit'"
:node=
"node"
/>
<view2
v-show=
"viewType === 'AircraftSorties'"
:show-flag=
"viewType === 'AircraftSorties'"
:node=
"node"
/>
<view2
ref=
"AircraftSorties"
v-show=
"viewType === 'AircraftSorties'"
:show-flag=
"viewType === 'AircraftSorties'"
:node=
"node"
/>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -101,14 +101,14 @@ export default {
...
@@ -101,14 +101,14 @@ export default {
getData
(
params
)
{
getData
(
params
)
{
this
.
node
=
params
this
.
node
=
params
},
},
im
port
()
{
ex
port
()
{
this
.
$refs
[
this
.
viewType
].
export
()
},
},
save
()
{
save
()
{
this
.
$refs
[
this
.
viewType
].
save
()
},
},
config
()
{
config
()
{
this
.
$refs
[
this
.
viewType
].
config
()
}
}
}
}
}
}
...
...
applications/dee-mes/src/privateComponents/components/MBOMConfig/step.vue
View file @
0529a544
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
<
script
>
<
script
>
import
config
from
'./config'
import
config
from
'./config'
import
data
from
'./data'
import
data
from
'./data'
import
CsvExportor
from
'csv-exportor'
export
default
{
export
default
{
name
:
'TfMomWebStep'
,
name
:
'TfMomWebStep'
,
mixins
:
[
config
,
data
],
mixins
:
[
config
,
data
],
...
@@ -49,7 +50,8 @@ export default {
...
@@ -49,7 +50,8 @@ export default {
}
}
}
}
return
'<span>'
+
labels
.
join
(
','
)
+
'</span>'
return
'<span>'
+
labels
.
join
(
','
)
+
'</span>'
}
},
editor
:
{
type
:
'custom_datepicker_editor'
}
}
}
]
]
}
}
...
@@ -76,7 +78,8 @@ export default {
...
@@ -76,7 +78,8 @@ export default {
id
:
item
.
id
,
id
:
item
.
id
,
parenId
:
link
&&
link
.
prevNodeId
||
''
,
parenId
:
link
&&
link
.
prevNodeId
||
''
,
start_date
:
'2007-1-1'
,
start_date
:
'2007-1-1'
,
duration
:
item
.
workHour
?
(
item
.
workHour
/
8
)
:
0
type
:
'task'
,
duration
:
item
.
workHour
?
Number
(
item
.
workHour
/
8
)
:
0
})
})
if
(
link
)
{
if
(
link
)
{
params
.
links
.
push
({
params
.
links
.
push
({
...
@@ -90,9 +93,9 @@ export default {
...
@@ -90,9 +93,9 @@ export default {
})
})
}
}
})
})
this
.
params
=
JSON
.
parse
(
JSON
.
stringify
(
params
))
this
.
params
=
params
this
.
gantt
.
clearAll
()
this
.
gantt
.
clearAll
()
this
.
gantt
.
parse
(
params
)
this
.
gantt
.
parse
(
this
.
params
)
},
},
getData
()
{
getData
()
{
this
.
currentId
=
this
.
node
.
id
this
.
currentId
=
this
.
node
.
id
...
@@ -120,7 +123,6 @@ export default {
...
@@ -120,7 +123,6 @@ export default {
},
},
configLayout
()
{
configLayout
()
{
const
ganttAg
=
this
.
gantt
const
ganttAg
=
this
.
gantt
const
that
=
this
const
getInput
=
function
(
node
)
{
const
getInput
=
function
(
node
)
{
return
node
.
querySelector
(
'input'
)
return
node
.
querySelector
(
'input'
)
}
}
...
@@ -194,8 +196,12 @@ export default {
...
@@ -194,8 +196,12 @@ export default {
ganttAg
.
ext
.
zoom
.
init
(
zoomConfig
)
ganttAg
.
ext
.
zoom
.
init
(
zoomConfig
)
// 允许通过拖放来调整任务大小
// 允许通过拖放来调整任务大小
ganttAg
.
config
.
drag_resize
=
true
ganttAg
.
config
.
drag_resize
=
true
ganttAg
.
config
.
highlight_critical_path
=
false
ganttAg
.
config
.
highlight_critical_path
=
true
ganttAg
.
templates
.
link_class
=
function
(
link
)
{
if
(
link
.
isCritical
)
{
return
'critical_path'
}
}
ganttAg
.
config
.
editor_types
.
custom_datepicker_editor
=
{
ganttAg
.
config
.
editor_types
.
custom_datepicker_editor
=
{
show
:
function
(
id
,
column
,
config
,
placeholder
)
{
show
:
function
(
id
,
column
,
config
,
placeholder
)
{
var
html
=
var
html
=
...
@@ -212,7 +218,7 @@ export default {
...
@@ -212,7 +218,7 @@ export default {
focus
:
function
(
node
)
{},
focus
:
function
(
node
)
{},
set_value
:
function
(
value
,
id
,
column
,
node
)
{
set_value
:
function
(
value
,
id
,
column
,
node
)
{
// eslint-disable-next-line eqeqeq
// eslint-disable-next-line eqeqeq
var
data
=
that
.
data
.
links
var
data
=
ganttAg
.
getTableData
()
.
data
.
links
.
filter
((
p
)
=>
p
.
target
===
id
)
.
filter
((
p
)
=>
p
.
target
===
id
)
.
map
((
p
)
=>
ganttAg
.
getWBSCode
(
ganttAg
.
getTask
(
p
.
source
)))
.
map
((
p
)
=>
ganttAg
.
getWBSCode
(
ganttAg
.
getTask
(
p
.
source
)))
ganttAg
.
getWBSCode
(
ganttAg
.
getTask
(
id
))
ganttAg
.
getWBSCode
(
ganttAg
.
getTask
(
id
))
...
@@ -277,12 +283,11 @@ export default {
...
@@ -277,12 +283,11 @@ export default {
// 删除连接后触发
// 删除连接后触发
ganttAg
.
attachEvent
(
'onAfterLinkDelete'
,
function
(
id
,
item
)
{
ganttAg
.
attachEvent
(
'onAfterLinkDelete'
,
function
(
id
,
item
)
{
var
target
=
ganttAg
.
getTask
(
item
.
target
)
var
target
=
ganttAg
.
getTask
(
item
.
target
)
console
.
log
(
ganttAg
,
target
)
var
targetLength
=
target
.
$target
.
length
var
targetLength
=
target
.
$target
.
length
if
(
!
targetLength
)
{
if
(
!
targetLength
)
{
var
data
=
{
var
data
=
{
links
:
this
.
gantt
.
getTableData
().
data
.
links
,
links
:
ganttAg
.
getTableData
().
data
.
links
,
data
:
this
.
gantt
.
getTableData
().
data
.
data
.
map
((
p
)
=>
{
data
:
ganttAg
.
getTableData
().
data
.
data
.
map
((
p
)
=>
{
delete
p
.
end_date
delete
p
.
end_date
p
.
start_date
=
new
Date
(
2007
,
0
,
1
)
p
.
start_date
=
new
Date
(
2007
,
0
,
1
)
return
p
return
p
...
@@ -298,8 +303,75 @@ export default {
...
@@ -298,8 +303,75 @@ export default {
}
}
return
true
return
true
})
})
this
.
$nextTick
(()
=>
{
ganttAg
.
init
(
this
.
ganttElId
)
})
},
export
(
mode
)
{
if
(
mode
===
'png'
)
{
this
.
gantt
.
exportToPNG
({
locale
:
'CN'
,
name
:
'AG600.png'
// data: this.tasks
})
}
else
if
(
mode
===
'pdf'
)
{
this
.
gantt
.
exportToPDF
({
name
:
'AG600.pdf'
})
}
else
{
var
dd
=
this
.
gantt
.
getTableData
()
const
tableData
=
dd
.
data
.
data
.
filter
(
p
=>
!
p
.
priority
).
map
((
p
)
=>
{
return
{
index
:
p
.
index
,
text
:
p
.
text
,
duration
:
Math
.
round
(
p
.
duration
),
predecessors
:
Object
.
values
(
p
)
.
filter
((
item
)
=>
item
.
toString
().
includes
(
'<span>'
))[
0
]
.
replace
(
'<span>'
,
''
)
.
replace
(
'</span>'
,
''
)
}
})
const
header
=
[
'节点'
,
'站位号'
,
'工期(天)'
,
'前置'
]
CsvExportor
.
downloadCsv
(
tableData
,
{
header
},
'站位路线.csv'
)
}
},
save
()
{
const
tasks
=
this
.
gantt
.
getTableData
().
data
.
data
const
links
=
this
.
gantt
.
getTableData
().
data
.
links
const
params
=
this
.
ganttData
.
map
(
item
=>
{
const
routes
=
item
.
extProcessExecutorRoutes
.
map
(
r
=>
{
return
{
id
:
r
.
id
,
operator
:
'REMOVE'
}
})
const
task
=
tasks
.
find
(
r
=>
r
.
id
===
item
.
id
)
if
(
item
.
extProcessExecutorRoutes
)
{
const
link
=
links
.
find
(
r
=>
r
.
target
===
item
.
id
)
if
(
link
)
{
routes
.
push
({
operator
:
'ADD'
,
subTypeName
:
'ExtProcessExecutorRoute'
,
prevNodeIdType
:
'ExtPosition'
,
currNodeIdType
:
'ExtPosition'
,
currNodeId
:
Number
(
link
.
target
),
prevNodeId
:
Number
(
link
.
source
),
isCritical
:
link
.
isCritical
})
}
}
return
{
id
:
item
.
id
,
operator
:
'MODIFY'
,
subTypeName
:
'ExtPosition'
,
workHour
:
task
&&
(
task
.
duration
*
8
)
||
0
,
extProcessExecutorRoutes
:
routes
}
})
this
.
$api
.
recursion
(
'ExtPosition'
,
params
,
true
).
then
(()
=>
{
this
.
getData
()
})
}
}
}
}
}
}
</
script
>
</
script
>
...
...
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