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
fbba8819
Commit
fbba8819
authored
Aug 03, 2023
by
jingnan
👀
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://94.191.100.41/tfmom/tf-mom-web
into dev
parents
2e877113
11e901de
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
997 additions
and
949 deletions
+997
-949
export.js
...ications/architecture-dee/public/gantt_codebase/export.js
+890
-914
package.json
applications/dee-mes/package.json
+1
-0
index.vue
...ts/components/AddOutStorageCallbackDetailDialog/index.vue
+1
-1
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
+95
-16
No files found.
applications/architecture-dee/public/gantt_codebase/export.js
View file @
fbba8819
This diff is collapsed.
Click to expand it.
applications/dee-mes/package.json
View file @
fbba8819
...
...
@@ -10,6 +10,7 @@
"dependencies"
:
{
"axios"
:
"^0.19.2"
,
"bpmn-js"
:
"^7.0.0"
,
"csv-exportor"
:
"^1.0.2"
,
"camunda-bpmn-moddle"
:
"^4.4.0"
,
"lodash.foreach"
:
"^4.5.0"
,
"moment"
:
"^2.26.0"
,
...
...
applications/dee-mes/src/privateComponents/components/AddOutStorageCallbackDetailDialog/index.vue
View file @
fbba8819
...
...
@@ -91,7 +91,7 @@ export default {
'extMaterialId'
:
r
.
jobResponse
.
jobOrder
.
extMaterialId
,
'extMaterialIdType'
:
r
.
jobResponse
.
jobOrder
.
extMaterialIdType
,
'arrivalDate'
:
r
.
jobResponse
.
jobOrder
.
arrivalDate
,
//
'reqAmount': r.usableAmount,
'reqAmount'
:
r
.
usableAmount
,
'airModel'
:
r
.
jobResponse
.
jobOrder
.
airModel
,
'sorties'
:
r
.
jobResponse
.
jobOrder
.
sorties
,
'manufacturer'
:
r
.
jobResponse
.
jobOrder
.
manufacturer
,
...
...
applications/dee-mes/src/privateComponents/components/MBOMConfig/config.js
View file @
fbba8819
...
...
@@ -5,14 +5,14 @@ export default {
}
},
mounted
()
{
this
.
initGantt
()
this
.
gantt
&&
this
.
initGantt
()
},
methods
:
{
initGantt
()
{
this
.
setColumnsConfig
()
this
.
configLayout
()
this
.
gantt
.
init
(
this
.
ganttElId
)
this
.
usePlugins
()
this
.
gantt
.
i18n
.
setLocale
(
'cn'
)
this
.
configLayout
()
},
setColumnsConfig
()
{
this
.
gantt
.
config
.
columns
=
this
.
columns
...
...
applications/dee-mes/src/privateComponents/components/MBOMConfig/data.js
View file @
fbba8819
...
...
@@ -33,15 +33,7 @@ export default {
},
methods
:
{
search
()
{
},
export
()
{
},
save
()
{
}
}
}
applications/dee-mes/src/privateComponents/components/MBOMConfig/gatt.vue
View file @
fbba8819
...
...
@@ -9,9 +9,9 @@
<dee-tools
mode=
"normal"
:tools=
"tools"
/>
</div>
<div
class=
"content-model"
>
<step
v-show=
"viewType === 'ExtPosition'"
:show-flag=
"viewType === 'ExtPosition'"
:node=
"node"
/>
<unit
v-show=
"viewType === 'unit'"
:show-flag=
"viewType === 'unit'"
:node=
"node"
/>
<view2
v-show=
"viewType === 'AircraftSorties'"
:show-flag=
"viewType === 'AircraftSorties'"
:node=
"node"
/>
<step
ref=
"ExtPosition"
v-show=
"viewType === 'ExtPosition'"
:show-flag=
"viewType === 'ExtPosition'"
:node=
"node"
/>
<unit
ref=
"unit"
v-show=
"viewType === 'unit'"
:show-flag=
"viewType === 'unit'"
:node=
"node"
/>
<view2
ref=
"AircraftSorties"
v-show=
"viewType === 'AircraftSorties'"
:show-flag=
"viewType === 'AircraftSorties'"
:node=
"node"
/>
</div>
</div>
</
template
>
...
...
@@ -101,14 +101,14 @@ export default {
getData
(
params
)
{
this
.
node
=
params
},
im
port
()
{
ex
port
()
{
this
.
$refs
[
this
.
viewType
].
export
()
},
save
()
{
this
.
$refs
[
this
.
viewType
].
save
()
},
config
()
{
this
.
$refs
[
this
.
viewType
].
config
()
}
}
}
...
...
applications/dee-mes/src/privateComponents/components/MBOMConfig/step.vue
View file @
fbba8819
...
...
@@ -7,6 +7,7 @@
<
script
>
import
config
from
'./config'
import
data
from
'./data'
import
CsvExportor
from
'csv-exportor'
export
default
{
name
:
'TfMomWebStep'
,
mixins
:
[
config
,
data
],
...
...
@@ -35,10 +36,10 @@ export default {
computed
:
{
columns
()
{
return
[
{
name
:
'index'
,
label
:
'节点'
,
width
:
6
0
,
align
:
'center'
,
resize
:
true
},
{
name
:
'text'
,
label
:
'站位号'
,
width
:
16
0
,
align
:
'center'
,
resize
:
true
},
{
name
:
'duration'
,
label
:
'工期(天)'
,
width
:
10
0
,
align
:
'center'
,
resize
:
true
,
editor
:
{
type
:
'number'
,
map_to
:
'duration'
,
min
:
0
,
max
:
100
}},
{
name
:
''
,
label
:
'前置'
,
width
:
15
0
,
align
:
'center'
,
resize
:
true
,
template
:
(
task
)
=>
{
{
name
:
'index'
,
label
:
'节点'
,
width
:
3
0
,
align
:
'center'
,
resize
:
true
},
{
name
:
'text'
,
label
:
'站位号'
,
width
:
4
0
,
align
:
'center'
,
resize
:
true
},
{
name
:
'duration'
,
label
:
'工期(天)'
,
width
:
3
0
,
align
:
'center'
,
resize
:
true
,
editor
:
{
type
:
'number'
,
map_to
:
'duration'
,
min
:
0
,
max
:
100
}},
{
name
:
''
,
label
:
'前置'
,
width
:
4
0
,
align
:
'center'
,
resize
:
true
,
template
:
(
task
)
=>
{
var
links
=
task
.
$target
var
labels
=
[]
for
(
var
i
=
0
;
i
<
links
.
length
;
i
++
)
{
...
...
@@ -49,7 +50,8 @@ export default {
}
}
return
'<span>'
+
labels
.
join
(
','
)
+
'</span>'
}
},
editor
:
{
type
:
'custom_datepicker_editor'
}
}
]
}
...
...
@@ -76,7 +78,8 @@ export default {
id
:
item
.
id
,
parenId
:
link
&&
link
.
prevNodeId
||
''
,
start_date
:
'2007-1-1'
,
duration
:
item
.
workHour
?
(
item
.
workHour
/
8
)
:
0
type
:
'task'
,
duration
:
item
.
workHour
?
Number
(
item
.
workHour
/
8
)
:
0
})
if
(
link
)
{
params
.
links
.
push
({
...
...
@@ -90,9 +93,9 @@ export default {
})
}
})
this
.
params
=
JSON
.
parse
(
JSON
.
stringify
(
params
))
this
.
params
=
params
this
.
gantt
.
clearAll
()
this
.
gantt
.
parse
(
params
)
this
.
gantt
.
parse
(
this
.
params
)
},
getData
()
{
this
.
currentId
=
this
.
node
.
id
...
...
@@ -120,7 +123,6 @@ export default {
},
configLayout
()
{
const
ganttAg
=
this
.
gantt
const
that
=
this
const
getInput
=
function
(
node
)
{
return
node
.
querySelector
(
'input'
)
}
...
...
@@ -194,8 +196,7 @@ export default {
ganttAg
.
ext
.
zoom
.
init
(
zoomConfig
)
// 允许通过拖放来调整任务大小
ganttAg
.
config
.
drag_resize
=
true
ganttAg
.
config
.
highlight_critical_path
=
false
ganttAg
.
config
.
highlight_critical_path
=
true
ganttAg
.
config
.
editor_types
.
custom_datepicker_editor
=
{
show
:
function
(
id
,
column
,
config
,
placeholder
)
{
var
html
=
...
...
@@ -212,7 +213,7 @@ export default {
focus
:
function
(
node
)
{},
set_value
:
function
(
value
,
id
,
column
,
node
)
{
// eslint-disable-next-line eqeqeq
var
data
=
that
.
data
.
links
var
data
=
ganttAg
.
getTableData
()
.
data
.
links
.
filter
((
p
)
=>
p
.
target
===
id
)
.
map
((
p
)
=>
ganttAg
.
getWBSCode
(
ganttAg
.
getTask
(
p
.
source
)))
ganttAg
.
getWBSCode
(
ganttAg
.
getTask
(
id
))
...
...
@@ -277,17 +278,17 @@ export default {
// 删除连接后触发
ganttAg
.
attachEvent
(
'onAfterLinkDelete'
,
function
(
id
,
item
)
{
var
target
=
ganttAg
.
getTask
(
item
.
target
)
console
.
log
(
ganttAg
,
target
)
var
targetLength
=
target
.
$target
.
length
if
(
!
targetLength
)
{
var
data
=
{
links
:
this
.
gantt
.
getTableData
().
data
.
links
,
data
:
this
.
gantt
.
getTableData
().
data
.
data
.
map
((
p
)
=>
{
links
:
ganttAg
.
getTableData
().
data
.
links
,
data
:
ganttAg
.
getTableData
().
data
.
data
.
map
((
p
)
=>
{
delete
p
.
end_date
p
.
start_date
=
new
Date
(
2007
,
0
,
1
)
return
p
})
}
ganttAg
.
clearAll
()
ganttAg
.
parse
(
data
)
}
})
...
...
@@ -298,8 +299,86 @@ export default {
}
return
true
})
ganttAg
.
attachEvent
(
'onAfterBatchUpdate'
,
function
(
action
)
{
console
.
log
(
'onAfterBatchUpdate'
)
// your code here
})
ganttAg
.
attachEvent
(
'onAutoScheduleCircularLink'
,
function
(
groups
)
{
console
.
log
(
groups
,
'onAutoScheduleCircularLink'
)
// any custom logic here
})
ganttAg
.
attachEvent
(
'onAfterTaskAutoSchedule'
,
function
(
task
,
start
,
link
,
predecessor
)
{
console
.
log
(
task
,
start
,
link
,
predecessor
,
'onAfterTaskAutoSchedule'
)
})
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
>
...
...
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