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
fb26967f
Commit
fb26967f
authored
Nov 17, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ai aistep3 aistep4 aistep5
parent
8fd9c1b6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
947 additions
and
40 deletions
+947
-40
index.vue
pages/aps/ai/index.vue
+11
-23
indexOld.vue
pages/aps/ai/indexOld.vue
+621
-0
api.js
pages/aps/aps/api.js
+17
-2
datasShow.vue
pages/aps/results/datasShow.vue
+94
-14
index.vue
pages/aps/results/index.vue
+1
-1
indexData.vue
pages/aps/results/indexData.vue
+203
-0
No files found.
pages/aps/ai/index.vue
View file @
fb26967f
...
@@ -6,19 +6,19 @@
...
@@ -6,19 +6,19 @@
<Search
/>
<Search
/>
</
template
>
</
template
>
<
template
slot=
"buttons"
>
<
template
slot=
"buttons"
>
应用规则:
<!--
应用规则:
<Select
v-model=
"rulesAi"
multiple
style=
"width:280px;"
class=
"tl"
>
<Select
v-model=
"rulesAi"
multiple
style=
"width:280px;"
class=
"tl"
>
<Option
v-for=
"item in rulesAiList"
:value=
"item.value"
:key=
"item.value"
>
{{
item
.
label
}}
</Option>
<Option
v-for=
"item in rulesAiList"
:value=
"item.value"
:key=
"item.value"
>
{{
item
.
label
}}
</Option>
</Select>
</Select>
-->
<DatePicker
type=
"date"
placeholder=
"设置基准日期"
style=
"width: 150px;"
v-model=
"entity.setTime"
@
on-change=
"getTime"
></DatePicker>
<DatePicker
type=
"date"
placeholder=
"设置基准日期"
style=
"width: 150px;"
v-model=
"entity.setTime"
@
on-change=
"getTime"
></DatePicker>
<Button
type=
"primary"
@
click=
"openApsModal"
>
智能
排产
</Button>
<Button
type=
"primary"
@
click=
"openApsModal"
>
APS
排产
</Button>
</
template
>
</
template
>
<
template
slot=
"batch"
>
<
template
slot=
"batch"
>
<Button
type=
"primary"
class=
"mr10 ml10"
@
click=
"removeOk"
>
移出排产
</Button>
<Button
type=
"primary"
class=
"mr10 ml10"
@
click=
"removeOk"
>
移出排产
</Button>
</
template
>
</
template
>
</DataGrid>
</DataGrid>
<Modal
v-model=
"apsModal"
title=
"确定
智能
排产"
@
on-ok=
"apsOk"
@
on-cancel=
"cancel"
>
<Modal
v-model=
"apsModal"
title=
"确定
APS
排产"
@
on-ok=
"apsOk"
@
on-cancel=
"cancel"
>
<p>
确定进行
智能
排产?
</p>
<p>
确定进行
APS
排产?
</p>
</Modal>
</Modal>
<Modal
v-model=
"resultModal"
title=
"数据检查"
width=
"1500"
@
on-ok=
"cancel"
@
on-cancel=
"cancel"
>
<Modal
v-model=
"resultModal"
title=
"数据检查"
width=
"1500"
@
on-ok=
"cancel"
@
on-cancel=
"cancel"
>
...
@@ -505,30 +505,18 @@ export default {
...
@@ -505,30 +505,18 @@ export default {
//排产计算
//排产计算
let
paramsTime
=
{
let
paramsTime
=
{
setTime
:
this
.
entity
.
setTime
,
setTime
:
this
.
entity
.
setTime
,
rules
:
JSON
.
stringify
(
this
.
rulesAi
).
replace
(
'['
,
''
).
replace
(
']'
,
''
).
replace
(
/
\"
/g
,
''
)
//
rules: JSON.stringify(this.rulesAi).replace('[', '').replace(']', '').replace(/\"/g, '')
};
};
Api
.
apsprepareandcalc
(
paramsTime
)
Api
.
apsprepareandcalc
(
paramsTime
)
.
then
((
res2
)
=>
{
.
then
((
res2
)
=>
{
if
(
res2
.
success
)
{
if
(
res2
.
success
)
{
if
(
res2
.
result
.
res
)
{
if
(
res2
.
result
.
res
)
{
// this.$Message.success("排产计算成功");
this
.
$Message
.
success
(
"排产计算成功"
);
//智能排产操作start
this
.
circleModal
=
false
;
Api
.
aischedule
(
paramsTime
).
then
((
res3
)
=>
{
this
.
$router
.
push
({
if
(
res3
.
success
)
{
path
:
"/aps/results/indexData"
if
(
res3
.
result
.
res
)
{
// params: { customerId: id }
this
.
$Message
.
success
(
"排产成功"
);
this
.
circleModal
=
false
;
this
.
$router
.
push
({
path
:
"/aps/results"
,
// params: { customerId: id }
});
}
else
{
this
.
circleModal
=
false
;
this
.
$Message
.
error
(
res3
.
result
.
msg
);
}
}
});
});
//智能排产操作end
}
else
{
}
else
{
this
.
circleModal
=
false
;
this
.
circleModal
=
false
;
this
.
$Message
.
error
(
res2
.
result
.
msg
);
this
.
$Message
.
error
(
res2
.
result
.
msg
);
...
...
pages/aps/ai/indexOld.vue
0 → 100644
View file @
fb26967f
This diff is collapsed.
Click to expand it.
pages/aps/aps/api.js
View file @
fb26967f
...
@@ -139,12 +139,27 @@ export default {
...
@@ -139,12 +139,27 @@ export default {
},
},
//智能排产end----
//智能排产end----
//多级连排
//多级连排
start
createorderproductrelation
()
{
createorderproductrelation
()
{
return
Api
.
post
(
`
${
apsUrl
}
/apspoolappservices/createorderproductrelation`
)
return
Api
.
post
(
`
${
apsUrl
}
/apspoolappservices/createorderproductrelation`
)
},
},
apsdatascheduledlevel
(
params
)
{
apsdatascheduledlevel
(
params
)
{
return
Api
.
post
(
`
${
apsUrl
}
/apspoolappservices/aps_data_scheduled_level`
,
params
)
return
Api
.
post
(
`
${
apsUrl
}
/apspoolappservices/aps_data_scheduled_level`
,
params
)
},
},
//多级连排end
//智能排产数据包start
//数据包生成
aistep3
(
params
)
{
return
Api
.
post
(
`
${
apsUrl
}
/aps/aistep3`
,
params
)
},
//Python计算结果
aistep4
()
{
return
Api
.
post
(
`
${
apsUrl
}
/aps/aistep4`
)
},
//保存到规则表
aistep5
()
{
return
Api
.
post
(
`
${
apsUrl
}
/aps/aistep5`
)
},
//智能排产数据包end
}
}
pages/aps/results/datasShow.vue
View file @
fb26967f
<
template
>
<
template
>
<div>
<div>
<div>
应用规则:
<Select
v-model=
"rulesAi"
multiple
style=
"width: 280px"
class=
"tl"
>
<Option
v-for=
"item in rulesAiList"
:value=
"item.value"
:key=
"item.value"
>
{{
item
.
label
}}
</Option
>
</Select>
</div>
<div>
数据包结果集:
<dl
v-html=
"step3Info"
style=
"margin-left: 40px"
></dl>
</div>
<div
v-if=
"step4Statu"
>
Python计算结果:
<dl
v-html=
"step4Info"
style=
"margin-left: 40px"
></dl>
</div>
<FooterToolbar
class=
"ftball"
>
<FooterToolbar
class=
"ftball"
>
<Button
type=
"primary
"
>
下一步
</Button>
<Button
type=
"primary"
@
click=
"loadStep4
"
>
下一步
</Button>
<Button
>
取消
</Button>
<Button
@
click=
"cancel"
>
取消
</Button>
</FooterToolbar>
</FooterToolbar>
</div>
</div>
</
template
>
</
template
>
...
@@ -11,32 +30,93 @@
...
@@ -11,32 +30,93 @@
</
style
>
</
style
>
<
script
>
<
script
>
import
Api
from
"./api"
;
import
Api
from
".
./aps
/api"
;
export
default
{
export
default
{
name
:
"datasShow"
,
name
:
"datasShow"
,
components
:
{
components
:
{},
},
props
:
{
props
:
{
id
:
String
,
id
:
String
,
time
:
String
,
},
},
data
()
{
data
()
{
return
{
return
{
rulesAi
:
[
"1"
,
"2"
,
"3"
,
"4"
],
rulesAiList
:
[
{
value
:
"1"
,
label
:
"转序"
,
},
{
value
:
"2"
,
label
:
"多台"
,
},
{
value
:
"3"
,
label
:
"加班"
,
},
{
value
:
"4"
,
label
:
"公休"
,
},
],
step3Info
:
""
,
step4Info
:
""
,
step4Statu
:
false
,
step5Statu
:
false
,
};
};
},
},
created
()
{
created
()
{},
mounted
()
{
if
(
this
.
time
!=
""
)
{
this
.
loadStep3
(
this
.
time
);
}
},
},
methods
:
{
methods
:
{
loadStep3
(
val
)
{
let
paramsTime
=
{
rules
:
JSON
.
stringify
(
this
.
rulesAi
).
replace
(
'['
,
''
).
replace
(
']'
,
''
).
replace
(
/
\"
/g
,
''
),
};
Api
.
aistep3
(
paramsTime
).
then
((
res
)
=>
{
if
(
res
.
success
&&
res
.
result
!=
""
)
{
this
.
step3Info
=
res
.
result
;
}
});
},
loadStep4
()
{
if
(
!
this
.
step4Statu
&&
!
this
.
step5Statu
)
{
this
.
step4Statu
=
true
;
Api
.
aistep4
().
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
step4Info
=
res
.
result
;
}
});
}
else
if
(
this
.
step4Statu
&&
!
this
.
step5Statu
)
{
this
.
step4Statu
=
true
;
this
.
step5Statu
=
true
;
Api
.
aistep5
().
then
((
res1
)
=>
{
if
(
res1
.
success
)
{
this
.
$Message
.
success
(
"成功保存到规则表"
);
setTimeout
(
this
.
$router
.
push
({
path
:
"/aps/ai"
}),
2000
)
}
});
}
},
cancel
()
{
this
.
$emit
(
'close'
)
}
},
},
watch
:
{
watch
:
{
id
(
v
)
{
time
(
v
)
{
if
(
v
!=
''
)
{
if
(
v
!=
""
)
{
this
.
loadStep3
(
v
);
}
}
},
},
},
},
};
};
</
script
>
</
script
>
pages/aps/results/index.vue
View file @
fb26967f
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
<a
href=
"#"
@
click=
"comeBlck"
class=
"black"
>
APS排产
</a>
<a
href=
"#"
@
click=
"comeBlck"
class=
"black"
>
APS排产
</a>
</Col>
</Col>
<Col
span=
"10"
style=
"text-align: right;"
>
<Col
span=
"10"
style=
"text-align: right;"
>
<a
href=
"#"
@
click=
"datasShow"
>
数据包
</a>
<a
href=
"#"
@
click=
"datasShow"
v-if=
"false"
>
数据包
</a>
<a
href=
"#"
@
click=
"gantChart"
v-if=
"gant"
>
甘特图
</a>
<a
href=
"#"
@
click=
"gantChart"
v-if=
"gant"
>
甘特图
</a>
</Col>
</Col>
</Row>
</Row>
...
...
pages/aps/results/indexData.vue
0 → 100644
View file @
fb26967f
<
style
lang=
"less"
>
@import "./results.less";
</
style
>
<
template
>
<div
class=
"results"
>
<Layout>
<Sider
hide-trigger
width=
"300"
>
<h4>
排产方案列表
</h4>
<div
class=
"btn"
>
<a
href=
"#"
@
click=
"clear"
>
<Icon
type=
"ios-trash"
/>
<span>
清空列表
</span>
</a>
</div>
<div
class=
"left-body"
v-for=
"(li,index) in list"
:key=
"index"
:class=
"isactive == index ? 'addclass' : '' "
>
<Checkbox
v-model=
"li.checked"
class=
"i-checkbox"
@
on-change=
"changeCheck(li,index)"
></Checkbox>
<div
class=
"title-t"
@
click=
"listData(li,index)"
>
排产方案:
{{
li
.
schedule_Id
}}
</div>
<div
class=
"fa"
>
排产时间:
{{
li
.
plan_Date
}}
</div>
<div
class=
"fa"
>
<span>
{{
li
.
iNSERTFLAG
}}
/
</span>
<span>
参数级别:
{{
li
.
routing_schema
}}
/
</span>
<span>
参数应用:
{{
li
.
routing_version
}}
</span>
</div>
</div>
</Sider>
<Content>
<Row
class=
"i-row"
>
<Col
span=
"2"
v-if=
"blacks"
>
<h4
:text=
"title"
>
{{
title
}}
</h4>
</Col>
<Col
span=
"10"
>
<a
href=
"#"
@
click=
"comeBlck"
class=
"black"
>
智能排产
</a>
</Col>
<Col
span=
"10"
style=
"text-align: right;"
v-if=
"gant"
>
<a
href=
"#"
@
click=
"datasShow"
>
数据包
</a>
<a
href=
"#"
@
click=
"gantChart"
>
甘特图
</a>
</Col>
</Row>
<component
:is=
"detail"
:eid=
"id"
:schemas=
"schemas"
@
ok-claer=
"clearS"
/>
</Content>
</Layout>
<div
class=
"footer"
v-if=
"showFooter"
>
<span>
已选:
{{
schemas
.
length
}}
项
</span>
<Button
type=
"primary"
@
click=
"submit"
>
方案对比
</Button>
<Button
type=
"default"
@
click=
"cancel"
>
取消
</Button>
</div>
<Modal
v-model=
"modal1Gant"
fullscreen
:title=
"modalTitle"
footer-hide
>
<!--
<Gantt
:id=
"id"
/>
-->
<gantt
:is=
"gantt"
:id=
"id"
:time=
"time"
@
close=
"closemodal"
/>
</Modal>
</div>
</
template
>
<
script
>
import
Api
from
"./api"
;
// import Gantt from "./gantt";
export
default
{
// components: {
// Gantt
// },
data
()
{
return
{
curId
:
null
,
detail
:
null
,
isactive
:
null
,
list
:
[],
name
:
"name1"
,
id
:
null
,
contrastList
:
[],
title
:
""
,
modal1Gant
:
false
,
showFooter
:
false
,
total
:
0
,
blacks
:
false
,
gant
:
false
,
gantt
:
null
,
curPage
:
null
,
modalTitle
:
'甘特图'
,
time
:
''
,
};
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
created
()
{
this
.
orderlist
();
},
methods
:
{
clickTab
(
name
)
{},
orderlist
()
{
Api
.
getall
()
.
then
(
r
=>
{
if
(
r
.
result
)
{
this
.
list
=
r
.
result
;
this
.
list
.
map
(
u
=>
{
u
.
checked
=
false
;
});
}
})
.
catch
(
error
=>
{
this
.
$Message
.
error
(
"请求失败"
);
});
},
listData
(
row
,
index
)
{
this
.
blacks
=
true
;
this
.
gant
=
true
;
this
.
detail
=
()
=>
import
(
"./result"
);
this
.
isactive
=
index
;
this
.
id
=
row
.
schedule_Id
;
this
.
time
=
row
.
plan_Date
;
this
.
title
=
"排产方案结果"
;
},
clear
()
{
if
(
this
.
list
.
length
>
0
)
{
this
.
$Modal
.
confirm
({
title
:
"清空列表"
,
content
:
"您确定要清空列表吗"
,
onOk
:
()
=>
{
Api
.
clearall
().
then
(
r
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"清空列表成功"
);
this
.
orderlist
();
this
.
id
=
0
;
this
.
listData
();
}
});
},
onCancel
:
()
=>
{
this
.
$Message
.
info
(
"已取消"
);
}
});
}
},
clearS
()
{
this
.
id
=
0
;
Api
.
clearall
().
then
(
r
=>
{
if
(
r
.
success
)
{
this
.
orderlist
();
this
.
id
=
0
;
this
.
listData
();
}
});
},
// 返回
comeBlck
()
{
this
.
$router
.
push
({
path
:
"/aps/ai"
});
},
parameter
()
{
Api
.
processschemedispatch
({
id
:
this
.
id
}).
then
(
r
=>
{
if
(
r
.
result
)
{
this
.
$Message
.
success
(
r
.
result
.
retmsg
);
this
.
orderlist
();
}
else
{
this
.
$Message
.
success
(
"下发失败"
);
}
});
},
//甘特图
gantChart
()
{
this
.
modal1Gant
=
true
;
this
.
modalTitle
=
'甘特图'
;
this
.
gantt
=
()
=>
import
(
"./gantt"
);
},
datasShow
()
{
this
.
modal1Gant
=
true
;
this
.
modalTitle
=
'生成数据包'
;
this
.
gantt
=
()
=>
import
(
"./datasShow"
);
},
changeCheck
(
item
,
i
)
{
this
.
$set
(
this
.
list
,
i
,
item
);
if
(
this
.
title
!=
"排产方案对比"
)
{
this
.
showFooter
=
true
;
}
},
submit
()
{
this
.
detail
=
()
=>
import
(
"./compare"
);
this
.
title
=
"排产方案对比"
;
this
.
showFooter
=
false
;
},
cancel
()
{
this
.
showFooter
=
false
;
},
closemodal
(){
this
.
modal1Gant
=
false
this
.
time
=
''
}
},
computed
:
{
schemas
()
{
return
this
.
list
.
filter
(
u
=>
{
return
u
.
checked
==
true
;
});
}
}
};
</
script
>
\ No newline at end of file
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