仪表换新列表优化
This commit is contained in:
@@ -5,21 +5,24 @@
|
||||
<uni-data-checkbox v-model="formData.type" :localdata="items"></uni-data-checkbox>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="设备编号">
|
||||
<uni-easyinput
|
||||
:input-border="false"
|
||||
v-model="formData.deviceCode"
|
||||
placeholder="请输入设备号"
|
||||
>
|
||||
<template #right>
|
||||
<uni-icons type="scan" color="#737373"></uni-icons>
|
||||
</template>
|
||||
</uni-easyinput>
|
||||
<view class="flex items-center justify-between">
|
||||
<uni-easyinput
|
||||
class="flex-1"
|
||||
:input-border="false"
|
||||
v-model="formData.deviceCode"
|
||||
placeholder="请输入设备号"
|
||||
:clearable="true"
|
||||
>
|
||||
</uni-easyinput>
|
||||
<uni-icons @tap="handleScan" size="48rpx" type="scan" color="#737373"></uni-icons>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="房屋号">
|
||||
<uni-easyinput
|
||||
:inputBorder="false"
|
||||
@tap="handleClick"
|
||||
disabled
|
||||
v-model="houseName"
|
||||
placeholderStyle="color: #999999"
|
||||
placeholder="请选择安装房屋"
|
||||
>
|
||||
@@ -29,11 +32,16 @@
|
||||
</uni-easyinput>
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
|
||||
<view class="action_btn" @tap="handleSubmit">
|
||||
<text>提 交</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
const formData = ref({
|
||||
type: 1,
|
||||
deviceCode: '',
|
||||
@@ -50,8 +58,31 @@ const items = [
|
||||
}
|
||||
]
|
||||
|
||||
const houseName = ref('')
|
||||
/** 处理 安装房屋 */
|
||||
function handleClick() {
|
||||
console.log('click')
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/instrument/checkouthouse',
|
||||
events: {
|
||||
backData: data => {
|
||||
houseName.value = data.HouseName
|
||||
formData.value.houseId = data.Houseid
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
/** 处理 扫码 */
|
||||
function handleScan() {
|
||||
// 允许从相机和相册扫码
|
||||
uni.scanCode({
|
||||
success: function (res) {
|
||||
formData.value.deviceCode = res.result
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function handleSubmit() {
|
||||
console.log(formData.value)
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -70,5 +101,21 @@ function handleClick() {
|
||||
&:deep(.uni-easyinput__content) {
|
||||
background: none !important;
|
||||
}
|
||||
|
||||
.action_btn {
|
||||
width: 670rpx;
|
||||
height: 80rpx;
|
||||
background: #4d5dfa;
|
||||
border-radius: 8rpx;
|
||||
|
||||
text-align: center;
|
||||
|
||||
margin-top: 300rpx;
|
||||
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #ffffff;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user