diff --git a/src/components/device/slectDeviceList.vue b/src/components/device/slectDeviceList.vue index d697d0d..e602a88 100644 --- a/src/components/device/slectDeviceList.vue +++ b/src/components/device/slectDeviceList.vue @@ -185,6 +185,8 @@ } } .list { + overflow-y: auto; /* 启用垂直滚动条 */ + max-height: 500px; /* 设置最大高度 */ .device { display: flex; margin-bottom: 20rpx; diff --git a/src/components/item/slectItemList.vue b/src/components/item/slectItemList.vue index 7a2d9bb..3b1e773 100644 --- a/src/components/item/slectItemList.vue +++ b/src/components/item/slectItemList.vue @@ -240,6 +240,8 @@ function chooseItem(item) { } .list { + overflow-y: auto; /* 启用垂直滚动条 */ + max-height: 500px; /* 设置最大高度 */ .item { display: flex; margin-bottom: 20rpx; diff --git a/src/pages/upkeepOrder/addServiceRecord.vue b/src/pages/upkeepOrder/addServiceRecord.vue index 39fe281..08e0e0f 100644 --- a/src/pages/upkeepOrder/addServiceRecord.vue +++ b/src/pages/upkeepOrder/addServiceRecord.vue @@ -99,7 +99,7 @@ - + {{form1.name}} @@ -371,9 +371,23 @@ const form = ref({ } else { singleColumnDefaultValue.value = [] } - //singleColumnShow.value = true + singleColumnShow.value = true + } + + // 单列模式 + function openSingleColumnItem(fieldName, val, list, from) { + if (fieldName == 'deviceNumber' && form.value.id) return; + whichForm.value = from + singleColumnList.value = list + field.value = fieldName + if (val) { + singleColumnDefaultValue.value = [list.findIndex(item => item.value == val)] + } else { + singleColumnDefaultValue.value = [] + } isShowSelectItem.value = true; } + // 单列模式点击确定之后 function chooseSingleColumn(e) { if(whichForm.value == 'form'){