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
00cc6099
Commit
00cc6099
authored
Apr 20, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apspoolappservices
parent
8a2c52cd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
460 additions
and
4 deletions
+460
-4
addTemp.vue
pages/aps/aps/addTemp.vue
+251
-0
api.js
pages/aps/aps/api.js
+6
-1
index.vue
pages/aps/aps/index.vue
+43
-3
temp.vue
pages/aps/aps/temp.vue
+160
-0
No files found.
pages/aps/aps/addTemp.vue
0 → 100644
View file @
00cc6099
<
template
>
<div
class=
"parameter"
>
<Form
ref=
"form"
label-position=
"top"
:model=
"entity"
:rules=
"rules"
>
<Row
:gutter=
"24"
>
<Col
span=
"24"
style=
"height:80px;"
>
<FormItem
label=
"模板名称"
prop=
"tempName"
>
<Input
v-model=
"entity.tempName"
></Input>
</FormItem>
</Col>
<Col
span=
"24"
style=
"height:90px;"
>
<FormItem
label=
"模板描述"
>
{{
entity
.
tempInfo
}}
</FormItem>
</Col>
<Col
span=
"24"
>
<FormItem
label=
"排序规则"
></FormItem>
</Col>
</Row>
<!--
<FormItem
class=
"click-btn"
>
<Button
type=
"primary"
@
click=
"handleSubmit"
>
确定
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
-->
</Form>
<div>
<div
class=
"listFather"
v-for=
"(item,index) in tempDataList"
v-dragging=
"
{ item: item, list: tempDataList, group: 'item'}"
:key="item.text"
title="拖动上下移动"
>
<div>
<Icon
type=
"md-move"
/>
{{
item
.
text
}}
</div>
<div
class=
"listChildren"
v-for=
"(item1,index1) in item.children"
v-dragging=
"
{ item: item1, list: item.children, group: 'item1' }"
:key="index1"
>
<div>
<Icon
type=
"md-move"
/>
{{
item1
.
text
}}
</div>
</div>
</div>
</div>
</div>
</
template
>
<
script
>
import
Api
from
"./api"
;
export
default
{
data
()
{
return
{
entity
:
{
id
:
null
,
tempName
:
""
,
tempInfo
:
""
},
tempDataList
:
[
{
id
:
1
,
text
:
"时间节点要素"
},
{
id
:
2
,
text
:
"批量工时要素"
},
{
id
:
3
,
text
:
"工序数量要素"
},
{
id
:
4
,
text
:
"生产关重要素"
},
{
id
:
5
,
text
:
"紧急程度要素"
},
{
id
:
6
,
text
:
"生产类型要素"
,
children
:
[
{
id
:
7
,
text
:
"批产"
},
{
id
:
8
,
text
:
"研制"
},
{
id
:
9
,
text
:
"工装"
},
{
id
:
10
,
text
:
"协外"
}
]
}
],
tempInfo
:
""
,
listTemp
:
[],
listTempShort
:
[],
rules
:
{
tempName
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
}
};
},
props
:
{
partTaskPk
:
{
//生产计划ID
type
:
Number
,
default
:
0
},
taskSeq
:
{
//工序编号
type
:
String
,
default
:
""
},
row
:
{
type
:
Object
,
default
:
()
=>
{
return
null
;
}
}
},
created
()
{},
mounted
()
{
this
.
$dragging
.
$on
(
"dragged"
,
({
value
})
=>
{
// console.log("aaa__" + JSON.stringify(value.item));
// console.log("bbb__" + JSON.stringify(value.list));
if
(
this
.
listTemp
.
length
<
1
&&
value
.
list
.
length
<
5
)
{
this
.
listTemp
=
this
.
tempDataList
;
this
.
listTempShort
=
value
.
list
;
this
.
listTemp
.
forEach
(
dataAdd1
=>
{
if
(
dataAdd1
.
children
&&
dataAdd1
.
children
.
length
>
0
)
{
dataAdd1
.
children
=
[];
dataAdd1
.
children
=
this
.
listTempShort
;
}
});
}
else
if
(
this
.
listTemp
.
length
>
1
&&
value
.
list
.
length
<
5
)
{
this
.
listTempShort
=
value
.
list
;
this
.
listTemp
.
forEach
(
dataAdd
=>
{
if
(
dataAdd
.
children
&&
dataAdd
.
children
.
length
>
0
)
{
dataAdd
.
children
=
[];
dataAdd
.
children
=
this
.
listTempShort
;
}
});
}
else
{
this
.
listTempShort
=
[];
this
.
listTemp
=
value
.
list
;
}
this
.
outInfo
(
this
.
listTemp
);
});
this
.
$dragging
.
$on
(
"dragend"
,
()
=>
{});
this
.
loadInfo
();
},
methods
:
{
//加载模板描述信息
loadInfo
()
{
let
tempList
=
this
.
tempDataList
;
this
.
outInfo
(
tempList
);
},
//返回模板描述信息
outInfo
(
list
)
{
this
.
tempInfo
=
""
;
list
.
forEach
(
data
=>
{
if
(
data
.
children
&&
data
.
children
.
length
>
0
)
{
let
dataInfo
=
""
;
data
.
children
.
forEach
(
dataChild
=>
{
dataInfo
+=
dataChild
.
text
+
"-->"
;
});
dataInfo
=
dataInfo
.
substring
(
0
,
dataInfo
.
length
-
3
);
this
.
tempInfo
+=
data
.
text
.
substr
(
0
,
data
.
text
.
length
-
2
)
+
"【"
+
dataInfo
+
"】-->"
;
}
else
{
this
.
tempInfo
+=
data
.
text
.
substr
(
0
,
data
.
text
.
length
-
2
)
+
"-->"
;
}
});
this
.
tempInfo
=
this
.
tempInfo
.
substring
(
0
,
this
.
tempInfo
.
length
-
3
);
this
.
entity
.
tempInfo
=
this
.
tempInfo
;
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
valid
=>
{
if
(
valid
)
{
// Api.apsschedulupdateparameter(this.entity)
// .then(res => {
// if (res.result.state) {
// this.$Message.success(res.result.msg);
// this.$emit("on-parameter-ok");
// } else {
// this.$Message.error(res.result.msg);
// }
// })
// .catch(e => {
// this.$Message.error("数据异常!");
// });
}
});
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
l
(
key
)
{
let
vkey
=
"mes_op_task_plan_simulate"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
}
},
computed
:
{},
watch
:
{}
};
</
script
>
<
style
lang=
"less"
>
.parameter {
.ivu-form-item {
margin-bottom: 4px;
vertical-align: top;
zoom: 1;
}
.ivu-form .ivu-form-item-label {
font-weight: bold;
padding: 0;
}
.listFather {
padding: 5px 5px 0px 5px;
border-bottom: #ccc solid 1px;
line-height: 30px;
cursor: pointer;
}
.listFather:hover {
background: #E9F2FD;
}
.listChildren {
padding: 5px 5px 5px 20px;
border-bottom: #ccc dotted 1px;
line-height: 25px;
cursor: pointer;
}
.listChildren:hover{
background: #D3E6FB;
}
}
</
style
>
\ No newline at end of file
pages/aps/aps/api.js
View file @
00cc6099
...
...
@@ -84,5 +84,10 @@ export default {
apsupdate
(
params
)
{
return
Api
.
post
(
`
${
designUrl
}
/routingdetail/apsupdate `
,
params
);
},
//排序模板相关start-----
//获取排序规则下拉列表
getdropsortlist
()
{
return
Api
.
get
(
`
${
apsUrl
}
/apspoolappservices/getdropsortlist`
);
},
//排序模板相关end-----
}
pages/aps/aps/index.vue
View file @
00cc6099
...
...
@@ -15,7 +15,13 @@
>
<template
slot=
"easySearch"
></
template
>
<
template
slot=
"searchBack"
>
<Select
placeholder=
"选择历史方案"
style=
"width: 150px;"
></Select>
<Select
placeholder=
"选择排序优先级"
v-model=
"tempValue"
style=
"width: 150px;"
>
</Select>
<a
style=
"font-weight: bold;"
@
click=
"openaddModalTemp"
>
<Icon
type=
"md-color-palette"
size=
"14"
/>
自定义排序模板
</a>
<Select
placeholder=
"选择历史方案"
style=
"width: 150px;"
></Select>
<DatePicker
type=
"date"
placeholder=
"设置基准日期"
...
...
@@ -42,6 +48,9 @@
<Button
type=
"primary"
class=
"mr10 ml10"
@
click=
"removeOk"
>
移出排产
</Button>
</
template
>
</DataGrid>
<Modal
v-model=
"addModalTemp"
title=
"自定义排序模板"
footer-hide
width=
"1000"
class=
"tempModal"
>
<Temp></Temp>
</Modal>
<Modal
v-model=
"addModal"
title=
"工序参数设置"
footer-hide
width=
"1000"
>
<Add
@
on-close=
"cancel"
...
...
@@ -71,12 +80,15 @@
<
script
>
import
Api
from
"./api"
;
import
Add
from
"./add"
;
import
Temp
from
"./temp"
;
import
Expand
from
"./components/excute"
;
import
API
from
'../../../iview-pro/examples/iview/types/iview.components'
;
export
default
{
name
:
"list"
,
components
:
{
Add
,
Expand
Expand
,
Temp
},
data
()
{
return
{
...
...
@@ -92,6 +104,7 @@ export default {
detailModal
:
false
,
deletelModal
:
false
,
apsModal
:
false
,
addModalTemp
:
false
,
list
:
[],
curId
:
0
,
columns
:
[
...
...
@@ -310,7 +323,10 @@ export default {
count
:
0
//生产计划数量
},
//设置参数结束
circleModal
:
false
//进度条
circleModal
:
false
,
//进度条
listTemp
:[],
//自定义模板排序下拉框列表
tempValue
:
null
,
};
},
mounted
()
{
...
...
@@ -327,6 +343,12 @@ export default {
this
.
list
=
res
.
result
;
}
});
// Api.getdropsortlist().then(resDrop=>{
// if(resDrop.success)
// {
// this.listTemp=resDrop.result
// }
// })
},
addOk
()
{
this
.
list
=
[];
...
...
@@ -545,6 +567,10 @@ export default {
};
}
this
.
addModal
=
true
;
},
//打开自定义排序模板窗口
openaddModalTemp
()
{
this
.
addModalTemp
=
true
;
}
}
};
...
...
@@ -581,4 +607,18 @@ export default {
top: 0;
}
}
.tempModal {
.ivu-modal-body {
padding: 16px;
font-size: 14px;
line-height: 1.5;
padding-top: 2px;
padding-bottom: 0px;
}
.ivu-modal-footer {
border-top: none;
padding: 12px 18px 12px 18px;
text-align: right;
}
}
</
style
>
pages/aps/aps/temp.vue
0 → 100644
View file @
00cc6099
<
template
>
<div>
<DataGrid
:columns=
"columnsTemp"
ref=
"gridTemp"
:data=
"listTemp"
:high=
"false"
:page=
"false"
:batch=
"false"
:easy=
"false"
:set=
"false"
:height=
"300"
>
<template
slot=
"buttons"
>
<Button
type=
"primary"
@
click=
"addTempModal"
>
新增模板
</Button>
</
template
>
</DataGrid>
<Modal
v-model=
"tempModal"
title=
"新增模板"
class=
"tempModal"
>
<AddTemp></AddTemp>
</Modal>
</div>
</template>
<
script
>
import
Api
from
"./api"
;
import
AddTemp
from
"./addTemp"
;
export
default
{
components
:
{
AddTemp
},
data
()
{
return
{
tempModal
:
false
,
columnsTemp
:
[
{
key
:
"id"
,
title
:
"id"
,
hide
:
true
,
width
:
50
},
{
key
:
"tempName"
,
title
:
"模板名称"
,
align
:
"left"
,
width
:
200
},
{
key
:
"tempInfo"
,
title
:
"模板描述"
,
align
:
"left"
},
{
title
:
"操作"
,
key
:
"action"
,
width
:
100
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
// h("op", {
// attrs: {
// icon: "md-create",
// type: "icon",
// title: "編輯模板",
// oprate: "edit"
// },
// on: { click: () => this.edit(params.row) }
// }),
h
(
"op"
,
{
attrs
:
{
icon
:
"ios-trash"
,
type
:
"icon"
,
title
:
"删除模板"
,
oprate
:
"delete"
,
msg
:
"确定删除模板?"
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
part_task_pk
)
}
})
]);
}
}
],
listTemp
:
[
{
id
:
1
,
tempName
:
"模型名称1"
,
tempInfo
:
"时间节点-->批量工时-->工序数量-->生产关重-->紧急程度-->生产类型【批产-->研制-->工装-->协外】"
},
{
id
:
2
,
tempName
:
"模型名称2"
,
tempInfo
:
"工序数量-->生产关重-->时间节点-->生产类型【批产-->工装-->协外-->研制】-->批量工时-->紧急程度"
},
{
id
:
3
,
tempName
:
"模型名称3"
,
tempInfo
:
"批量工时-->紧急程度-->生产类型【研制-->工装-->批产-->协外】-->工序数量-->生产关重-->时间节点"
},
{
id
:
4
,
tempName
:
"模型名称4"
,
tempInfo
:
"生产关重-->生产类型【批产-->协外-->研制-->工装】-->紧急程度-->时间节点-->批量工时-->工序数量"
},
{
id
:
5
,
tempName
:
"模型名称5"
,
tempInfo
:
"生产关重-->生产类型【批产-->协外-->研制-->工装】-->紧急程度-->工序数量-->时间节点-->批量工时"
}
]
};
},
props
:
{
taskSeq
:
{
//工序编号
type
:
String
,
default
:
""
},
count
:
{
//生产计划数量
type
:
Number
,
default
:
0
},
row
:
{
type
:
Object
,
default
:
()
=>
{
return
null
;
}
}
},
created
()
{
},
mounted
()
{},
methods
:
{
addTempModal
()
{
this
.
tempModal
=
true
;
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
valid
=>
{
if
(
valid
)
{
}
});
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
l
(
key
)
{
let
vkey
=
"mes_op_task_plan_simulate"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
}
},
computed
:
{},
watch
:
{}
};
</
script
>
<
style
lang=
"less"
>
</
style
>
\ 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