初步联调装表

This commit is contained in:
2025-11-03 16:26:30 +08:00
parent fe590353df
commit 1539304999
35 changed files with 1495 additions and 100 deletions

View File

@@ -0,0 +1,173 @@
// pages/workBenchNew/components/uninstallMeter/index.js
import dayjs from "../../../../utils/dayjs"
import { alertInfo, } from "../../../../utils/index"
Page({
/**
* 页面的初始数据
*/
data: {
},
onParkFocus(e) {
this.setData({
show: true,
title: "园区",
type: 'park'
})
},
onMeterFocus(e) {
const { park } = this.data;
if (!park) {
alertInfo("请先选择园区")
return;
}
this.setData({
show: true,
title: "电表",
type: 'meter'
})
},
onConfirm(e) {
const { type, data = {} } = e.detail;
const {collection} = this.data;
switch(type) {
case "park":
this.setData({
park: data.id,
parkName: data.name,
})
break;
case "tenement":
this.setData({
tenement: data.id,
tenementName: data.name,
})
break;
case "building":
this.setData({
building: data.id,
buildingName: data.name,
});
break;
case "meterBox":
this.setData({
meterBox: data.id,
meterBoxName: data.address,
});
break;
case "meterType":
this.setData({
meterType: data.way,
meterTypeName: data,
});
break;
case "meter":
this.setData({
meter: data.id,
meterName: data.address,
});
break;
case "card":
this.setData({
card: data.id,
cardName: data.sim_number,
});
break;
case "collection":
let newData = {}
if (collection === "A") {
newData = {
collectionA: data.id,
collectionAName: data.name,
}
}
if (collection === "B") {
newData = {
collectionB: data.id,
collectionBName: data.name,
}
}
if (collection === "C") {
newData = {
collectionC: data.id,
collectionCName: data.name,
}
}
this.setData(newData);
break;
}
this.onCancel();
},
onCancel() {
this.setData({
show: false,
title: "",
type: "",
})
},
goback() {
wx.navigateBack()
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({
time: dayjs().format("YYYY-MM-DD HH:mm:ss")
})
},
changeReason(e) {
this.setData({
reason: e.detail,
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@@ -0,0 +1,11 @@
{
"usingComponents": {
"navigator": "/components/navigator/index",
"van-popup": "@vant/weapp/popup/index",
"search-select": "/components/searchSelect/index",
"van-field": "@vant/weapp/field/index",
"van-button": "@vant/weapp/button/index",
"searchSelectWrapper": "/components/searchSelectWrapper/index"
},
"navigationStyle": "custom"
}

View File

@@ -0,0 +1,75 @@
<!--pages/workBenchNew/components/uninstallMeter/index.wxml-->
<navigator canBack="{{true}}" title="拆表" />
<view class="wrapper">
<searchSelectWrapper
label="当前时间"
placeholder="请选择园区"
useSlot
type=""
hideBorder="{{true}}"
>
<view> {{time}} </view>
</searchSelectWrapper>
<searchSelectWrapper
label="选择园区"
placeholder="请选择园区"
text="{{parkName}}"
bind:search="onParkFocus"
required="{{true}}"
/>
<searchSelectWrapper
label="选择电表"
placeholder="请选择电表"
text="{{meterName}}"
bind:search="onMeterFocus"
required="{{true}}"
/>
<searchSelectWrapper
label="原因"
placeholder="请输入原因"
text="reason"
type="input"
bind:changeText="changeReason"
/>
<searchSelectWrapper
label="图片"
useSlot="{{true}}"
type=""
hideBorder="{{true}}"
>
<van-button wx:if="{{!image}}" type="info" size="small"> 上传 </van-button>
</searchSelectWrapper>
<view class="operate">
<view class="submit"> <van-button type="info" block> 提交 </van-button> </view>
<view class="cancel"> <van-button block bind:tap="goback"> 返回 </van-button> </view>
</view>
</view>
<search-select
show="{{show}}"
title="{{title}}"
type="{{type}}"
park="{{park}}"
bindconfirm="onConfirm"
bindcancel="onCancel"
wx:if="{{show}}"
/>
<van-popup
show="{{ imageShow }}"
bind:close="onClose"
z-index="99999"
>
<van-image
width="100vw"
height="99.1vh"
fit="contain"
src="{{url}}"
bind:click="onClose"
/>
</van-popup>

View File

@@ -0,0 +1,15 @@
/* pages/workBenchNew/components/uninstallMeter/index.wxss */
.operate {
display: flex;
padding-top: 24rpx;
padding-bottom: 36rpx;
}
.submit, .cancel {
flex: 1;
}
.submit {
margin-right: 30rpx;
}