Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes-pad
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
ximai
mes-pad
Commits
5cc33ef7
Commit
5cc33ef7
authored
Mar 12, 2024
by
张海景
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:修改上下机状态
parent
34616f8d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
5 deletions
+44
-5
dModelList.vue
pages/mes/prodReport/components/dModelList.vue
+37
-5
zb-table.vue
uni_modules/zb-table/components/zb-table/zb-table.vue
+7
-0
No files found.
pages/mes/prodReport/components/dModelList.vue
View file @
5cc33ef7
...
...
@@ -4,7 +4,11 @@
<u-button
style=
"margin-left: 20rpx"
type=
"success"
size=
"mini"
@
click=
"commonClick('2')"
>
下机
</u-button>
<u-button
style=
"margin-left: 20rpx"
type=
"success"
size=
"mini"
@
click=
"handleScancode('1')"
>
上机扫描
</u-button>
<u-button
style=
"margin-left: 20rpx"
type=
"success"
size=
"mini"
@
click=
"handleScancode('2')"
>
下机扫描
</u-button>
<zb-table
:columns=
"tableColumn"
:data=
"tableData"
:stripe=
"true"
@
toggleAllSelection=
"toggleAllSelection"
@
toggleRowSelection=
"toggleRowSelection"
></zb-table>
<zb-table
:columns=
"tableColumn"
:data=
"tableData"
:stripe=
"true"
@
toggleAllSelection=
"toggleAllSelection"
@
toggleRowSelection=
"toggleRowSelection"
>
<template
slot=
"slot"
slot-scope=
"scope"
>
<u-tag
:text=
"scope.row.typeName"
:type=
"getTag(scope.row)"
></u-tag>
</
template
>
</zb-table>
</view>
</template>
...
...
@@ -16,6 +20,7 @@ export default {
default
:
()
=>
[]
}
},
dicts
:
[
'TOOL_MACHINES_TYPE'
],
data
()
{
return
{
tableSelectData
:
[],
...
...
@@ -25,6 +30,7 @@ export default {
width
:
35
},
{
type
:
'slot'
,
name
:
'typeName'
,
label
:
'状态'
,
width
:
80
...
...
@@ -32,18 +38,18 @@ export default {
{
name
:
'toolCode'
,
label
:
'刀模版sn码'
,
width
:
1
4
0
width
:
1
3
0
},
{
name
:
'toolName'
,
label
:
'刀模版名称'
,
width
:
1
4
0
width
:
1
3
0
},
{
name
:
'itemName'
,
label
:
'物料名称'
,
width
:
1
4
0
width
:
1
3
0
},
{
name
:
'upDate'
,
...
...
@@ -55,15 +61,41 @@ export default {
label
:
'下机时间'
,
width
:
140
}
]
]
,
};
},
computed
:
{
tableData
()
{
return
this
.
data
||
[];
}
},
mounted
()
{
},
methods
:
{
getTag
(
row
)
{
console
.
log
(
row
,
'row'
)
const
obj
=
{
'1'
:
'primary'
,
'2'
:
'success'
,
'3'
:
'info'
}
let
option
=
this
.
dict
.
type
.
TOOL_MACHINES_TYPE
.
map
(
item
=>
{
return
{
...
item
,
type
:
obj
[
item
.
value
]
}
})
let
type
=
''
option
.
forEach
(
item
=>
{
console
.
log
(
item
,
'item'
)
if
(
item
.
value
==
row
.
type
)
{
type
=
item
.
type
}
})
console
.
log
(
type
,
'type'
)
return
type
},
async
commonClick
(
type
)
{
if
(
this
.
tableSelectData
.
length
==
0
)
{
return
this
.
$u
.
toast
(
'请选择一条数据!'
);
...
...
uni_modules/zb-table/components/zb-table/zb-table.vue
View file @
5cc33ef7
...
...
@@ -145,6 +145,13 @@
<text>
{{
ite
.
filters
?
itemFilter
(
item
,
ite
)
:
formatterAction
(
item
,
ite
,
index
,
i
)
}}
</text>
</view>
</
template
>
<
template
v-else-if=
"ite.type === 'slot'"
>
<!-- 插槽的使用示例
<template
slot=
"slot"
slot-scope=
"scope"
>
{{
scope
.
row
}}
</
template
>
-->
<slot
name=
"slot"
:row=
"item"
:index=
"index"
></slot>
</template>
<
template
v-else
>
<!--
{{
ite
.
filters
?
itemFilter
(
item
,
ite
):(
item
[
ite
.
name
]
==
null
||
item
[
ite
.
name
]
===
''
)?
ite
.
emptyString
:
item
[
ite
.
name
]
}}
-->
{{
ite
.
filters
?
itemFilter
(
item
,
ite
)
:
formatterAction
(
item
,
ite
,
index
,
i
)
}}
...
...
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