This commit is contained in:
zhouyanli
2026-06-26 10:08:01 +08:00
3 changed files with 24 additions and 12 deletions

View File

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

View File

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

View File

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