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
5cce97f6
Commit
5cce97f6
authored
Mar 20, 2024
by
张海景
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:修改报工人员样式
parent
ef1a018a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
51 deletions
+26
-51
userPersonnel.vue
pages/mes/prodReport/components/userPersonnel.vue
+26
-51
No files found.
pages/mes/prodReport/components/userPersonnel.vue
View file @
5cce97f6
<
template
>
<
template
>
<view
class=
"dmodel-table"
>
<view
class=
"dmodel-table"
>
<view
class=
"search"
>
<view
class=
"search"
>
<u-search
:showAction=
"false"
v-model=
"userName"
inputAlign=
"center"
placeholder=
"请输入编号"
></u-search>
<u-form
:model=
"tableParams"
labelAlign=
"right"
class=
"tableForm"
>
<u-search
:showAction=
"false"
v-model=
"nickName"
inputAlign=
"center"
placeholder=
"请输入名称"
></u-search>
<u-form-item
label=
"编号"
label-width=
"60px"
name=
"userName"
>
<u-button
type=
"primary"
@
click=
"getList"
size=
"medium"
>
搜索
</u-button>
<uni-easyinput
type=
"text"
v-model=
"tableParams.userName"
placeholder=
"请输入编号"
/>
</view>
</u-form-item>
<u-form-item
label=
"名称"
label-width=
"60px"
name=
"nickName"
>
<uni-easyinput
type=
"text"
v-model=
"tableParams.nickName"
placeholder=
"请输入名称"
/>
</u-form-item>
<u-form-item>
<u-button
class=
"btn"
@
click=
"getList"
type=
"primary"
size=
"medium"
>
搜索
</u-button>
</u-form-item>
</u-form>
</view>
<zb-table
ref=
"zbTable"
rowKey=
"recordId"
<zb-table
ref=
"zbTable"
rowKey=
"recordId"
:columns=
"tableColumn"
:data=
"tableData"
:stripe=
"true"
@
toggleAllSelection=
"toggleAllSelection"
:columns=
"tableColumn"
:data=
"tableData"
:stripe=
"true"
@
toggleRowSelection=
"toggleRowSelection"
>
@
toggleRowSelection=
"toggleRowSelection"
>
</zb-table>
</zb-table>
</view>
</view>
...
@@ -22,13 +30,15 @@
...
@@ -22,13 +30,15 @@
},
},
data
()
{
data
()
{
return
{
return
{
tableParams
:
{
nickName
:
null
,
userName
:
null
,
},
tableData
:
[],
tableData
:
[],
tableSelectData
:
[],
tableSelectData
:
[],
nickName
:
null
,
userName
:
null
,
tableColumn
:
[{
tableColumn
:
[{
type
:
'
selection
'
,
type
:
'
radio
'
,
width
:
35
width
:
40
},
},
{
{
name
:
'userName'
,
name
:
'userName'
,
...
@@ -56,40 +66,10 @@
...
@@ -56,40 +66,10 @@
// }
// }
// },
// },
mounted
()
{
mounted
()
{
console
.
log
(
this
.
data
,
'this.data'
)
console
.
log
(
this
.
data
.
workstationName
)
this
.
getList
()
this
.
getList
()
// this.data.workstationName
// this.data.workstationName
},
},
methods
:
{
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
()
{
async
getList
()
{
let
params
=
{
let
params
=
{
pageNum
:
1
,
pageNum
:
1
,
...
@@ -97,10 +77,10 @@
...
@@ -97,10 +77,10 @@
workstationId
:
this
.
data
.
workstationId
workstationId
:
this
.
data
.
workstationId
}
}
if
(
this
.
userName
)
{
if
(
this
.
userName
)
{
params
.
userName
=
this
.
userName
params
.
userName
=
this
.
tableParams
.
userName
}
}
if
(
this
.
nickName
)
{
if
(
this
.
nickName
)
{
params
.
nickName
=
this
.
nickName
params
.
nickName
=
this
.
tableParams
.
nickName
}
}
const
res
=
await
this
.
$u
.
api
.
userQuery
(
params
)
const
res
=
await
this
.
$u
.
api
.
userQuery
(
params
)
console
.
log
(
res
,
'res'
)
console
.
log
(
res
,
'res'
)
...
@@ -114,9 +94,6 @@
...
@@ -114,9 +94,6 @@
}
}
},
},
toggleAllSelection
(
checked
,
arr
)
{
this
.
tableSelectData
=
arr
},
toggleRowSelection
(
checked
,
arr
)
{
toggleRowSelection
(
checked
,
arr
)
{
this
.
tableSelectData
=
arr
this
.
tableSelectData
=
arr
},
},
...
@@ -130,13 +107,11 @@
...
@@ -130,13 +107,11 @@
margin-top
:
20
rpx
;
margin-top
:
20
rpx
;
padding
:
0
20
rpx
;
padding
:
0
20
rpx
;
}
}
.
search
{
.
tableForm
{
display
:
flex
;
display
:
flex
;
margin-bottom
:
20
rpx
;
margin-bottom
:
20
rpx
;
align-items
:
center
;
}
.u-search{
.btn
{
width
:
400
rpx
!important
;
margin-left
:
10px
;
margin-right
:
20
rpx
!important
;
}
}
}
</
style
>
</
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