|
@@ -2,7 +2,7 @@
|
|
|
<view class="uni-column container" >
|
|
|
<scroll-view class="scroll-container" scroll-y>
|
|
|
<view v-for="(item, index) in listData" :key="index"
|
|
|
- :class="{'list-item':true,'selected':isSelected(index)}" @click="handleSelection(item,index)">
|
|
|
+ class="list-item" >
|
|
|
<view class="title-container uni-row">
|
|
|
<view class="title uni-row">
|
|
|
<text class="label">批次号:</text>
|
|
@@ -66,7 +66,6 @@
|
|
|
|
|
|
const listData = ref([])
|
|
|
const curSubDetails = ref({})
|
|
|
- const selection = ref([])
|
|
|
const endWorkDialog = ref(null)
|
|
|
const selectEquipment = ref(null)
|
|
|
const equipmentList = ref([])
|
|
@@ -83,19 +82,6 @@
|
|
|
console.log(listData)
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
- function isSelected(index){
|
|
|
- return selection.value.includes(index)
|
|
|
- }
|
|
|
-
|
|
|
- function handleSelection(item,index){
|
|
|
- const buttonIndex = selection.value.indexOf(index);
|
|
|
- if (buttonIndex > -1) {
|
|
|
- selection.value.splice(buttonIndex, 1); // 取消选中
|
|
|
- } else {
|
|
|
- selection.value.push(index); // 选中
|
|
|
- }
|
|
|
- }
|
|
|
function handleShowEndWorkDialog(data){
|
|
|
// 调用子组件中的方法
|
|
|
endWorkDialog.value.open(data)
|
|
@@ -150,10 +136,6 @@
|
|
|
left: 0;
|
|
|
}
|
|
|
|
|
|
- .selected {
|
|
|
- border: 1px solid #1684fc;
|
|
|
- }
|
|
|
-
|
|
|
.list-item {
|
|
|
background-color: #fff;
|
|
|
position: relative;
|