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
fda1fb0d
Commit
fda1fb0d
authored
Mar 11, 2024
by
chenzj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产报工人自动带入和自己选择
parent
8a5b5bd6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
123 additions
and
0 deletions
+123
-0
http.api.js
common/http.api.js
+3
-0
userPersonnel.vue
pages/mes/prodReport/components/userPersonnel.vue
+120
-0
No files found.
common/http.api.js
View file @
fda1fb0d
...
...
@@ -62,6 +62,9 @@ const install = (Vue, vm) => {
//
getIpqcCode
:
(
params
=
{})
=>
vm
.
$u
.
get
(
config
.
adminPath
+
'/system/autocode/get/IPQC_CODE'
,
params
),
//查看人员管理
userQuery
:
(
params
=
{})
=>
vm
.
$u
.
get
(
config
.
adminPath
+
'/mes/md/workstationworker/list'
,
params
),
//增加缺陷记录
addDefectrecord
:
(
params
=
{})
=>
...
...
pages/mes/prodReport/components/userPersonnel.vue
0 → 100644
View file @
fda1fb0d
<
template
>
<view
class=
"dmodel-table"
>
<zb-table
ref=
"zbTable"
rowKey=
"recordId"
:columns=
"tableColumn"
:data=
"tableData"
:stripe=
"true"
@
toggleAllSelection=
"toggl
eAllSelection"
@
toggleRowSelection=
"toggleRowSelection"
>
</zb-table>
</view>
</
template
>
<
script
>
export
default
{
props
:
{
data
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
data
()
{
return
{
tableData
:
[],
tableSelectData
:
[],
tableColumn
:
[{
type
:
'selection'
,
width
:
35
},
{
name
:
'nickName'
,
label
:
'名称'
,
width
:
200
,
},
{
name
:
'userName'
,
label
:
'编号'
,
width
:
160
,
},
{
name
:
'workstationName'
,
label
:
'工作站'
,
width
:
160
,
},
],
}
},
// computed: {
// tableData() {
// return this.data || []
// }
// },
mounted
()
{
console
.
log
(
this
.
data
,
'this.data'
)
console
.
log
(
this
.
data
.
workstationName
)
this
.
getList
()
// this.data.workstationName
},
methods
:
{
rowClick
(
row
,
index
)
{
console
.
log
(
this
.
$refs
.
zbTable
)
this
.
$refs
.
zbTable
.
checkboxSelectedAll
({
checked
:
false
})
this
.
$refs
.
zbTable
.
toggleRowSelection
(
row
)
},
async
commonClick
(
type
)
{
if
(
this
.
tableSelectData
.
length
==
0
)
{
return
this
.
$u
.
toast
(
'请选择一条数据!'
)
}
// 判断选中的类型是否一致
if
(
this
.
tableSelectData
.
length
>
1
)
{
let
flag
=
false
for
(
let
i
=
1
;
i
<
this
.
tableSelectData
.
length
;
i
++
)
{
const
pre
=
this
.
tableSelectData
[
i
-
1
]
const
cur
=
this
.
tableSelectData
[
i
]
flag
=
cur
.
type
==
pre
.
type
if
(
!
flag
)
{
break
;
}
}
if
(
!
flag
)
{
return
this
.
$u
.
toast
(
'请选择状态相同的数据'
)
}
}
},
async
getList
()
{
const
params
=
{
pageNum
:
1
,
pageSize
:
10
,
workstationId
:
this
.
data
.
workstationId
}
const
res
=
await
this
.
$u
.
api
.
userQuery
(
params
)
console
.
log
(
res
,
'res'
)
if
(
res
.
code
==
200
)
{
this
.
tableData
=
res
.
rows
.
map
(
item
=>
{
return
{
...
item
,
workstationName
:
this
.
data
.
workstationName
}
})
}
},
toggleAllSelection
(
checked
,
arr
)
{
this
.
tableSelectData
=
arr
},
toggleRowSelection
(
checked
,
arr
)
{
this
.
tableSelectData
=
arr
},
}
}
</
script
>
<
style
scoped
>
.dmodel-table
{
height
:
500
rpx
;
margin-top
:
20
rpx
;
padding
:
0
20
rpx
;
}
</
style
>
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