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
59d0b6fe
Commit
59d0b6fe
authored
Mar 09, 2024
by
张海景
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:修改zb-table组件加上选中方法
parent
f62a9a80
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
26 deletions
+66
-26
index.vue
pages/mes/prodReport/index.vue
+33
-25
login.vue
pages/sys/login/login.vue
+1
-1
zb-table.vue
uni_modules/zb-table/components/zb-table/zb-table.vue
+32
-0
No files found.
pages/mes/prodReport/index.vue
View file @
59d0b6fe
...
@@ -16,10 +16,11 @@
...
@@ -16,10 +16,11 @@
<view
class=
"prod-body-left-task"
>
<view
class=
"prod-body-left-task"
>
<zb-table
<zb-table
ref=
"zbtable"
:columns=
"tableColumn"
:columns=
"tableColumn"
:stripe=
"true"
:stripe=
"true"
rowKey=
"taskWorkunitId"
@
rowClick=
"rowClick"
@
rowClick=
"rowClick"
@
cellClick=
"cellClick"
@
toggleRowSelection=
"toggleRowSelection"
@
toggleRowSelection=
"toggleRowSelection"
@
toggleAllSelection=
"toggleAllSelection"
@
toggleAllSelection=
"toggleAllSelection"
:border=
"true"
:border=
"true"
...
@@ -695,19 +696,22 @@ export default {
...
@@ -695,19 +696,22 @@ export default {
tableColumn
:
[
tableColumn
:
[
{
{
type
:
'selection'
,
type
:
'selection'
,
width
:
35
width
:
80
},
},
{
{
name
:
'arrangeCode'
,
name
:
'arrangeCode'
,
label
:
'编排单号'
,
label
:
'编排单号'
,
width
:
140
,
width
:
200
,
func
:
'numclik'
cellFun
:
(
row
,
index
)
=>
{
console
.
log
(
row
,
index
)
this
.
tableDataDetail
=
row
.
proWorkorderList
;
this
.
showRowDeatilFlag
=
true
;
}
},
},
{
{
name
:
'startTime'
,
name
:
'startTime'
,
label
:
'计划开始时间'
,
label
:
'计划开始时间'
,
width
:
140
,
width
:
140
,
func
:
'numclik'
},
},
{
{
name
:
'endTime'
,
name
:
'endTime'
,
...
@@ -735,7 +739,7 @@ export default {
...
@@ -735,7 +739,7 @@ export default {
ERROR_STOP
:
'异常停工'
,
ERROR_STOP
:
'异常停工'
,
FINISH
:
'完工'
FINISH
:
'完工'
},
},
width
:
6
0
,
width
:
10
0
,
align
:
'center'
align
:
'center'
},
},
// {
// {
...
@@ -746,14 +750,14 @@ export default {
...
@@ -746,14 +750,14 @@ export default {
{
{
name
:
'taskCode'
,
name
:
'taskCode'
,
label
:
'任务单号'
,
label
:
'任务单号'
,
width
:
110
width
:
180
},
{
name
:
'workorderCode'
,
label
:
'生产单号'
,
width
:
120
},
},
// {
// {
// name: 'workorderCode',
// label: '生产单号',
// width: 120
// },
// {
// name: 'itemCode',
// name: 'itemCode',
// label: '物料编号',
// label: '物料编号',
// width: 110,
// width: 110,
...
@@ -779,12 +783,12 @@ export default {
...
@@ -779,12 +783,12 @@ export default {
width
:
80
,
width
:
80
,
align
:
'center'
align
:
'center'
},
},
{
//
{
name
:
'clientName'
,
//
name: 'clientName',
label
:
'作业人员'
,
//
label: '作业人员',
width
:
60
,
//
width: 60,
align
:
'center'
//
align: 'center'
}
//
}
],
],
dModelData
:
[],
dModelData
:
[],
tableSelectData
:
[],
tableSelectData
:
[],
...
@@ -942,12 +946,14 @@ export default {
...
@@ -942,12 +946,14 @@ export default {
urls
:
this
.
viewSop
urls
:
this
.
viewSop
});
});
},
},
cellClick
(
row
,
index
,
column
)
{
// cellClick(row, index, column) {
if
(
column
.
name
===
'arrangeCode'
)
{
// if (column.name === 'arrangeCode') {
this
.
tableDataDetail
=
row
.
proWorkorderList
;
// this.tableDataDetail = row.proWorkorderList;
this
.
showRowDeatilFlag
=
true
;
// this.showRowDeatilFlag = true;
}
// console.log(e)
},
// e.stopPropagation()
// }
// },
numclik
(...
arg
)
{
numclik
(...
arg
)
{
console
.
log
(
'99999999'
,
arg
);
console
.
log
(
'99999999'
,
arg
);
},
},
...
@@ -1095,14 +1101,16 @@ export default {
...
@@ -1095,14 +1101,16 @@ export default {
});
});
},
},
rowClick
(
row
,
index
)
{
rowClick
(
row
,
index
)
{
this
.
$refs
.
zbtable
.
toggleRowSelection
(
row
)
this
.
curTaskInfo
=
row
;
this
.
curTaskInfo
=
row
;
this
.
getMaterialUsageRecordList
();
this
.
getMaterialUsageRecordList
();
},
},
toggleAllSelection
(
checked
,
arr
)
{
toggleAllSelection
(
checked
,
arr
)
{
// console.log(arr, 'this.tableSelectData');
this
.
tableSelectData
=
arr
;
this
.
tableSelectData
=
arr
;
},
},
toggleRowSelection
(
checked
,
arr
)
{
toggleRowSelection
(
checked
,
arr
)
{
console
.
log
(
this
.
tableSelectData
,
'this.tableSelectData'
);
// console.log(arr
, 'this.tableSelectData');
this
.
tableSelectData
=
arr
;
this
.
tableSelectData
=
arr
;
},
},
knifeTemp
()
{
knifeTemp
()
{
...
...
pages/sys/login/login.vue
View file @
59d0b6fe
<
template
>
<
template
>
<view
class=
"login"
>
<view
class=
"login"
>
<u-form
ref=
"loginForm"
:modelValue=
"loginForm"
:rules=
"loginRules"
class=
"login-form"
>
<u-form
ref=
"loginForm"
:modelValue=
"loginForm"
:rules=
"loginRules"
class=
"login-form"
>
<h3
class=
"title"
>
MES
-PAD
</h3>
<h3
class=
"title"
>
MES
作业端
</h3>
<u-form-item
prop=
"username"
>
<u-form-item
prop=
"username"
>
<input
<input
v-model=
"loginForm.username"
v-model=
"loginForm.username"
...
...
uni_modules/zb-table/components/zb-table/zb-table.vue
View file @
59d0b6fe
...
@@ -140,6 +140,11 @@
...
@@ -140,6 +140,11 @@
<text
v-else
>
{{ ite.emptyString }}
</text>
<text
v-else
>
{{ ite.emptyString }}
</text>
</view>
</view>
</template>
</template>
<
template
v-else-if=
"ite.cellFun"
>
<view
@
click
.
stop=
"ite.cellFun(item,index)"
class=
"cellfunction"
>
<text>
{{
ite
.
filters
?
itemFilter
(
item
,
ite
)
:
formatterAction
(
item
,
ite
,
index
,
i
)
}}
</text>
</view>
</
template
>
<
template
v-else
>
<
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
):(
item
[
ite
.
name
]
==
null
||
item
[
ite
.
name
]
===
''
)?
ite
.
emptyString
:
item
[
ite
.
name
]
}}
-->
{{
ite
.
filters
?
itemFilter
(
item
,
ite
)
:
formatterAction
(
item
,
ite
,
index
,
i
)
}}
{{
ite
.
filters
?
itemFilter
(
item
,
ite
)
:
formatterAction
(
item
,
ite
,
index
,
i
)
}}
...
@@ -796,6 +801,30 @@ export default {
...
@@ -796,6 +801,30 @@ export default {
cellClick
(
row
,
index
,
column
)
{
cellClick
(
row
,
index
,
column
)
{
this
.
$emit
(
'cellClick'
,
row
,
index
,
column
)
this
.
$emit
(
'cellClick'
,
row
,
index
,
column
)
},
},
toggleRowSelection
(
row
)
{
const
items
=
this
.
selectArr
.
find
(
v
=>
v
[
this
.
rowKey
]
===
row
[
this
.
rowKey
])
if
(
items
&&
Object
.
keys
(
items
).
length
>
0
)
{
this
.
data
.
forEach
(
item
=>
{
if
(
item
[
this
.
rowKey
]
===
row
[
this
.
rowKey
])
{
this
.
$set
(
item
,
'checked'
,
false
)
}
})
this
.
selectArr
.
forEach
((
item
,
index
)
=>
{
if
(
item
[
this
.
rowKey
]
===
row
[
this
.
rowKey
])
{
this
.
selectArr
.
splice
(
index
,
1
)
}
});
this
.
$emit
(
'toggleRowSelection'
,
false
,
this
.
selectArr
)
}
else
{
this
.
data
.
forEach
(
item
=>
{
if
(
item
[
this
.
rowKey
]
===
row
[
this
.
rowKey
])
{
this
.
$set
(
item
,
'checked'
,
true
)
this
.
selectArr
.
push
(
item
)
}
})
this
.
$emit
(
'toggleRowSelection'
,
true
,
this
.
selectArr
)
}
},
rowClick
(
row
,
index
)
{
rowClick
(
row
,
index
)
{
if
(
this
.
highlight
)
{
if
(
this
.
highlight
)
{
this
.
currentRowIndex
=
index
this
.
currentRowIndex
=
index
...
@@ -1352,6 +1381,9 @@ export default {
...
@@ -1352,6 +1381,9 @@ export default {
//height: 100%;
//height: 100%;
width
:
100%
;
width
:
100%
;
}
}
.cellfunction
{
text-align
:
left
;
}
.even
{
.even
{
background-color
:
white
;
background-color
:
white
;
...
...
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