开始做工作台的抄表

This commit is contained in:
2025-09-05 17:32:27 +08:00
parent 399ef43d07
commit 71ad4995c8
21 changed files with 335 additions and 3 deletions

View File

@@ -0,0 +1,24 @@
// pages/writeReading/components/meterInfo/index.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})

View File

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@@ -0,0 +1,2 @@
<!--pages/writeReading/components/meterInfo/index.wxml-->
<text>pages/writeReading/components/meterInfo/index.wxml</text>

View File

@@ -0,0 +1 @@
/* pages/writeReading/components/meterInfo/index.wxss */

View File

@@ -0,0 +1,41 @@
// pages/writeReading/components/meterList/index.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
animationData: {}, // 存储动画数据
position: -100
},
lifetimes: {
attached() {
// 在页面准备就绪时初始化动画实例
this.animation = wx.createAnimation({
duration: 500, // 动画持续时间,单位 ms
timingFunction: 'ease-out', // 动画缓动函数,还可以是 'linear', 'ease-in', 'ease-in-out'
delay: 0 // 动画延迟时间
});
}
},
/**
* 组件的方法列表
*/
methods: {
handleLeft() {
// 将动画数据设置到 data 中,从而触发视图更新
this.setData({
position: this.data.position - 100,
});
}
}
})

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
}
}

View File

@@ -0,0 +1,24 @@
<!--pages/writeReading/components/meterList/index.wxml-->
<view class="wrapper">
<view class="title">
<text> 电表列表 </text>
</view>
<view style="display: flex; align-items: center;">
<view bind:tap="handleLeft">
</view>
<scroll-view
scroll-x="{{true}}"
class="meterListScrollView"
>
<view style="width: 1000px; margin-left: {{position}}rpx">
12345623425346356356356 12345623425346356356356 12345623425346356356356 12345623425346356356356
</view>
</scroll-view>
<view>
</view>
</view>
</view>

View File

@@ -0,0 +1,16 @@
/* pages/writeReading/components/meterList/index.wxss */
.wrapper {
padding: 0 20rpx;
}
.title {
margin-top: 20rpx;
}
.meterListScrollView {
flex: 1;
margin-left: 20rpx;
margin-right: 20rpx;
overflow: hidden;
}

View File

@@ -0,0 +1,66 @@
// pages/writeReading/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@@ -0,0 +1,7 @@
{
"usingComponents": {
"navigator": "/components/navigator/index",
"meter-list": "./components/meterList/index"
},
"navigationStyle": "custom"
}

View File

@@ -0,0 +1,3 @@
<!--pages/writeReading/index.wxml-->
<navigator title="录入抄表记录" canBack="{{true}}" />
<meter-list />

View File

@@ -0,0 +1 @@
/* pages/writeReading/index.wxss */