| | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function toScan(){ |
| | | // 调用二维码扫描接口 |
| | | uni.scanCode({ |
| | | scanType: ['qrCode'], |
| | | success: function (res) { |
| | | console.log('条码内容:' + res.result); |
| | | form.value.facilityCode = res.result |
| | | } |
| | | }); |
| | | } |
| | | async function submit(){ |
| | | form.value.url = uploadList.value |
| | | //去掉数组中空字符串,数组转字符串 |
| | |
| | | <form> |
| | | <view class="form-item"> |
| | | <view class="label">设备号:</view> |
| | | <input class="item-input" v-model="form.facilityCode" name="input" placeholder="请扫描水机站牌二维码或输入设备号" /> |
| | | <image src="../../static/images/addCard/code.png" alt=""></image> |
| | | <input class="item-input" v-model="form.facilityCode" name="input" placeholder="请扫描或输入设备号" /> |
| | | <image @click="toScan()" src="../../static/images/addCard/code.png" alt=""></image> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="label">联系方式:</view> |
| | |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="label">问题类型:</view> |
| | | <input class="item-input" name="input" v-model="form.type" placeholder="请选择问题类型" /> |
| | | <input class="item-input" name="input" v-model="form.type" placeholder="请输入数字" /> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="label">问题描述:</view> |
| | |
| | | <block v-for="(item,index) in uploadList"> |
| | | <view @click="uploadImg(index)" class="upload-img-item"> |
| | | <image v-if="item" :src="item"></image> |
| | | <image v-else class="default-img" src="../../static/images/other/img-add.png" alt=""></image> |
| | | </view> |
| | | </block> |
| | | </view> |
| | |
| | | align-items: center; |
| | | border-bottom: 1rpx solid rgba(111, 111, 111, 0.1); |
| | | height:100rpx; |
| | | .label{ |
| | | width:180rpx; |
| | | } |
| | | input{ |
| | | width:340rpx; |
| | | } |
| | | image{ |
| | | margin-left:60rpx; |
| | | margin-left:50rpx; |
| | | width:50rpx; |
| | | height:50rpx; |
| | | } |
| | |
| | | } |
| | | .upload-box{ |
| | | .upload-title{ |
| | | color: #5b93dc; |
| | | margin: 10rpx 20rpx 0; |
| | | color: #6a717e; |
| | | margin-top: 10rpx; |
| | | } |
| | | .upload-img{ |
| | | display: flex; |
| | |
| | | border-radius:20rpx; |
| | | border:1rpx dashed #b7d4ff; |
| | | margin-bottom: 10rpx; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | image{ |
| | | width:180rpx; |
| | | height:180rpx; |
| | | width:170rpx; |
| | | height:170rpx; |
| | | } |
| | | .default-img{ |
| | | width:120rpx; |
| | | height:120rpx; |
| | | } |
| | | } |
| | | } |
| | |
| | | left: calc(50% - 35%); |
| | | text-align: center; |
| | | border-radius:50rpx; |
| | | color: #5b93dc; |
| | | letter-spacing:5rpx; |
| | | } |
| | | } |
| | | } |