仪表换新接口添加小区id

This commit is contained in:
Zy
2026-06-25 08:04:10 +08:00
parent 6e0f0eda6f
commit c1f8c16e44
3 changed files with 24 additions and 12 deletions

View File

@@ -3,7 +3,7 @@
* @Author: Zy
* @Date: 2026-05-16 15:53:23
* @LastEditor: Zy
* @LastEditTime: 2026-05-16 16:38:54
* @LastEditTime: 2026-06-23 10:02:36
*/
import request, {
filterParams,
@@ -43,7 +43,7 @@ export const getReplaceMainList = (data) => {
/**
* @description: 添加仪表API
* @param {{ deviceType:DeviceType, deviceCode:string,houseId:string }} data
* @param {{ deviceType:DeviceType, deviceCode:string,houseId:string,villageId:string }} data
*/
export const AddReplaceMainList = (data) => {
return put('/manage/replace/sdb/replace/device', filterParams(data))

View File

@@ -113,7 +113,11 @@ function handleSubmit() {
title: '选择房屋'
})
}
AddReplaceMainList(formData.value)
const { villageId } = JSON.parse(uni.getStorageSync('currentVillage'))
AddReplaceMainList({
villageId,
...formData.value
})
.then(() => {
uni.showToast({
icon: 'success',

View File

@@ -17,15 +17,18 @@
v-for="(item, index) in infolist"
:key="index"
>
<view class="flex items-center">
<image lazy-load src="/static/imgs/home.png" class="icon" mode=""></image>
<view class="instrument_info">
<view class="flex-1 instrument_info">
<view class="instrument_title">
<text>{{ item.addressCn }}</text>
<text v-if="item.addressHyphen">({{ item.addressHyphen }})</text>
</view>
<view class="instrument_time">
<text>换新时间时间:{{ item.createTime }}</text>
</view>
<view class="instrument_time">
<text>更换设备为:</text>
<text>{{ item.deviceCode }}</text>
</view>
</view>
<view class="instrument_type">
@@ -192,9 +195,12 @@ function handleClick() {
.icon {
width: 40rpx;
height: 32rpx;
min-width: 40rpx;
}
.instrument_info {
flex: 1;
margin-left: 22rpx;
overflow: hidden;
.instrument_title {
font-weight: 550;
font-size: 32rpx;
@@ -206,10 +212,12 @@ function handleClick() {
font-weight: 400;
font-size: 24rpx;
color: #666666;
text-wrap: wrap;
line-height: 30rpx;
}
}
.instrument_type {
min-width: 50rpx;
font-weight: 400;
font-size: 24rpx;
color: #4d5dfa;