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
feba0a8c
Commit
feba0a8c
authored
Apr 03, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://git.mes123.com/zhouyx/mes-ui
into qin
parents
5091a54b
f4d865c4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
87 additions
and
103 deletions
+87
-103
edit.vue
pages/aps/aps/components/edit.vue
+48
-86
excute.vue
pages/aps/aps/components/excute.vue
+39
-17
No files found.
pages/aps/aps/components/edit.vue
View file @
feba0a8c
...
@@ -3,35 +3,27 @@
...
@@ -3,35 +3,27 @@
<Row>
<Row>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('tASKSEQ')"
prop=
"tASKSEQ"
>
<FormItem
:label=
"l('tASKSEQ')"
prop=
"tASKSEQ"
>
<
span>
{{
entity
.
task_seq
}}
</span
>
<
b>
{{
entity
.
task_seq
}}
</b
>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('tASKNAME')"
prop=
"tASKNAME"
>
<FormItem
:label=
"l('tASKNAME')"
prop=
"tASKNAME"
>
<
span>
{{
entity
.
task_name
}}
</span
>
<
b>
{{
entity
.
task_name
}}
</b
>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
label=
"班组"
prop=
"sHOPID"
>
<FormItem
label=
"班组"
prop=
"sHOPID"
>
<!-- v-model="orderSearchForm.orderCat" -->
<DepartmentSelect
v-model=
"entity.department_id"
@
on-change=
"deprtChange"
/>
<Select
v-model=
"entity.department_id"
>
<Option
v-for=
"(item,index) in list"
:key=
"index"
:value=
"item.value"
style=
"display:none"
:label=
"item.label"
></Option>
<Tree
key=
"mytree"
:data=
"orderCatList"
ref=
"mytree"
:render=
"renderContent"
></Tree>
<!--
<Option
v-for=
"(item,index) in orderCatList"
:value=
"item.title"
:key=
"index"
>
{{
item
.
title
}}
</Option>
-->
</Select>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
label=
"首选设备"
prop=
"eQUIPID"
>
<FormItem
label=
"首选设备"
prop=
"eQUIPID"
>
<Select
placeholder=
"编号 / 名称"
>
<Select
placeholder=
"编号 / 名称"
>
<Option
value=
""
class=
"option-text"
>
编号 / 名称
</Option>
<Option
<Option
v-for=
"(item,index) in equiptypeList"
:value=
"item.id"
:key=
"index"
>
{{
item
.
equipTypeName
}}
</Option>
v-for=
"(item,index) in equiptypeList"
:value=
"item.id"
:key=
"index"
>
{{
item
.
equipTypeName
}}
</Option>
</Select>
</Select>
</FormItem>
</FormItem>
</Col>
</Col>
...
@@ -42,17 +34,17 @@
...
@@ -42,17 +34,17 @@
<Option
v-for=
"item in orderCatList"
:value=
"item"
:key=
"item"
>
{{
item
}}
</Option>
<Option
v-for=
"item in orderCatList"
:value=
"item"
:key=
"item"
>
{{
item
}}
</Option>
</Select>
</Select>
</FormItem>
</FormItem>
</Col>
-->
</Col>
-->
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('rUNTIME')"
prop=
"rUNTIME"
>
<FormItem
:label=
"l('rUNTIME')"
prop=
"rUNTIME"
>
<!-- v-model="value1" -->
<!-- v-model="value1" -->
<InputNumber
:max=
"100"
:min=
"1"
></InputNumber>
<InputNumber
:max=
"100"
:min=
"1"
></InputNumber>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem>
<FormItem>
<!-- v-model="single" -->
<!-- v-model="single" -->
<Checkbox>
是否同步到原始工艺
</Checkbox>
<Checkbox>
是否同步到原始工艺
</Checkbox>
</FormItem>
</FormItem>
</Col>
</Col>
</Row>
</Row>
...
@@ -63,27 +55,27 @@
...
@@ -63,27 +55,27 @@
</Form>
</Form>
</
template
>
</
template
>
<
script
>
<
script
>
import
Api
from
'../api'
import
Api
from
"../api"
;
export
default
{
export
default
{
name
:
'Edit'
,
name
:
"Edit"
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
disabled
:
false
,
entity
:
{
entity
:
{
department_id
:
null
,
//班组
department_id
:
null
//班组
},
},
list
:[],
list
:
[],
selectdata
:
[],
selectdata
:
[],
orderCatList
:
[],
//班组
orderCatList
:
[],
//班组
equiptypeList
:
[],
//设备
equiptypeList
:
[],
//设备
rules
:
{
rules
:
{
name
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
}
}
}
}
;
},
},
props
:
{
props
:
{
eid
:
Number
,
eid
:
Number
,
parmse
:
String
,
parmse
:
Object
},
},
created
()
{
created
()
{
// this.getUserDepart()
// this.getUserDepart()
...
@@ -97,82 +89,52 @@ export default {
...
@@ -97,82 +89,52 @@ export default {
// })
// })
// },
// },
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
(
v
)
=>
{
this
.
$refs
.
form
.
validate
(
v
=>
{
if
(
v
)
{
if
(
v
)
{
this
.
disabled
=
true
this
.
disabled
=
true
;
// 未选是否同步到原始工艺
Api
.
subupdate
(
this
.
entity
)
Api
.
subupdate
(
this
.
entity
)
.
then
(
(
r
)
=>
{
.
then
(
r
=>
{
this
.
disabled
=
false
this
.
disabled
=
false
;
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
'on-ok'
)
this
.
$emit
(
"on-ok"
);
}
else
{
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
this
.
$Message
.
error
(
"保存失败"
);
}
}
})
})
.
catch
(
(
err
)
=>
{
.
catch
(
err
=>
{
this
.
disabled
=
false
this
.
disabled
=
false
;
this
.
$Message
.
error
(
'保存失败'
)
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
)
console
.
warn
(
err
)
;
})
})
;
}
}
})
});
},
renderContent
(
h
,
{
root
,
node
,
data
})
{
//渲染树的样式
return
h
(
"span"
,
{
style
:
{
// color: data.isProduct != "1" ? "#249E91" : "#333", //根据选中状态设置样式
cursor
:
"pointer"
},
on
:
{
click
:
()
=>
{
let
arrTree
=
[];
arrTree
.
push
(
data
);
this
.
handleSelect
(
arrTree
);
//手动选择树节点
}
}
},
data
.
title
);
},
},
handleSelect
(
data
)
{
deprtChange
(
v
,
item
){
if
(
data
.
length
>
0
)
{
console
.
log
(
v
,
item
)
this
.
selectdata
=
[];
this
.
selectdata
=
data
;
this
.
list
=
[];
this
.
list
.
push
({
label
:
data
[
0
].
title
,
value
:
data
[
0
].
id
});
// if (data[0].isProduct == "1") {
// this.orderSearchForm.productName = data[0].title;
// this.orderSearchForm.productId = data[0].productId;
// this.orderSearchForm.drawnNumber = data[0].drawingNo;
// } else {
// this.$Message.error("此节点不是产品,请选择产品节点!");
// }
}
},
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
'on-close'
)
this
.
$emit
(
"on-close"
);
},
},
l
(
key
)
{
l
(
key
)
{
key
=
'mes_op_task_execute'
+
'.'
+
key
key
=
"mes_op_task_execute"
+
"."
+
key
;
return
this
.
$t
(
key
)
return
this
.
$t
(
key
)
;
}
}
},
},
watch
:
{
watch
:
{
eid
(
v
)
{
eid
(
v
)
{
if
(
v
!=
0
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
)
this
.
load
(
v
)
;
}
}
},
},
parmse
(
u
){
parmse
(
u
)
{
console
.
log
(
u
)
console
.
log
(
"row数据:"
,
u
);
if
(
u
)
{
if
(
u
)
{
this
.
entity
=
u
this
.
entity
=
u
;
}
}
}
}
}
}
}
}
;
</
script
>
</
script
>
pages/aps/aps/components/excute.vue
View file @
feba0a8c
...
@@ -65,16 +65,31 @@ export default {
...
@@ -65,16 +65,31 @@ export default {
high
:
true
,
high
:
true
,
width
:
60
,
width
:
60
,
render
:
(
h
,
params
)
=>
{
render
:
(
h
,
params
)
=>
{
return
h
(
"Icon"
,
{
return
h
(
attrs
:
{
"Tooltip"
,
type
:
{
params
.
row
.
insert_flag
==
1
?
"ios-flag"
:
"ios-flag-outline"
,
props
:
{
size
:
20
,
content
:
params
.
row
.
insert_flag
==
1
?
"取消插单"
:
"进行插单"
,
color
:
params
.
row
.
insert_flag
==
1
?
"#2680EB"
:
"#aaa"
placement
:
"top"
,
},
class
:
'ico'
,
},
},
class
:
"click-h"
,
[
on
:
{
click
:
()
=>
this
.
changeFlag
(
params
.
row
.
id
,
params
.
index
)
}
h
(
"Icon"
,
{
});
attrs
:
{
type
:
params
.
row
.
insert_flag
==
1
?
"ios-flag"
:
"ios-flag-outline"
,
size
:
20
,
color
:
params
.
row
.
insert_flag
==
1
?
"#2680EB"
:
"#aaa"
,
},
on
:
{
click
:
()
=>
this
.
changeFlag
(
params
.
row
.
id
,
params
.
index
)
}
})
]
);
}
}
},
},
{
{
...
@@ -237,6 +252,13 @@ export default {
...
@@ -237,6 +252,13 @@ export default {
easy
:
true
,
easy
:
true
,
high
:
true
high
:
true
},
},
{
key
:
"first_equip"
,
title
:
this
.
l
(
"first_equip"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
{
{
key
:
"notes"
,
key
:
"notes"
,
title
:
this
.
l
(
"notes"
),
title
:
this
.
l
(
"notes"
),
...
@@ -398,20 +420,20 @@ export default {
...
@@ -398,20 +420,20 @@ export default {
this
.
editModal
=
true
;
this
.
editModal
=
true
;
this
.
formData
=
dataForm
this
.
formData
=
dataForm
// this.curId = Number(id);
// this.curId = Number(id);
this
.
getUserDepart
()
//
this.getUserDepart()
this
.
getEquiptypeList
()
this
.
getEquiptypeList
()
},
},
// 获取班组
// 获取班组
getUserDepart
(){
//
getUserDepart(){
Api
.
getUserDepart
().
then
(
res
=>
{
//
Api.getUserDepart().then(res=>{
// console.log(res.result)
//
// console.log(res.result)
this
.
$refs
.
editPart
.
orderCatList
=
res
.
result
//
this.$refs.editPart.orderCatList = res.result
})
//
})
},
//
},
// 获取设备
// 获取设备
getEquiptypeList
(){
getEquiptypeList
(){
Api
.
getEquiptypeList
().
then
(
res
=>
{
Api
.
getEquiptypeList
().
then
(
res
=>
{
//
console.log("设备",res.result)
console
.
log
(
"设备"
,
res
.
result
)
this
.
$refs
.
editPart
.
equiptypeList
=
res
.
result
this
.
$refs
.
editPart
.
equiptypeList
=
res
.
result
})
})
},
},
...
...
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