开始做工作台的抄表

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,60 @@
// pages/workBench/components/reading/index.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
onParkFocus(e) {
this.setData({
show: true,
title: "园区",
type: 'park'
})
},
async init() {
},
onConfirm(e) {
const { data } = e.detail;
const that = this;
this.setData({
parkName: data.name,
park: data.id,
}, () => {
loadingFunc(async () => {
await that.init();
})
})
this.onConcal();
},
onConcal() {
this.setData({
show: false,
title: "",
type: "",
})
},
jumpToReading(e) {
const { id } = e.currentTarget.dataset;
console.log("id", id, "e", e)
wx.navigateTo({
url: '/pages/writeReading/index',
})
}
}
})

View File

@@ -0,0 +1,16 @@
{
"component": true,
"usingComponents": {
"van-field": "@vant/weapp/field/index",
"van-button": "@vant/weapp/button/index",
"search-select": "/components/searchSelect/index",
"van-empty": "@vant/weapp/empty/index",
"table": "/components/table/table",
"pagination": "/components/pagination/index",
"empty": "/components/empty/index",
"van-radio": "@vant/weapp/radio/index",
"van-radio-group": "@vant/weapp/radio-group/index",
"van-dialog": "@vant/weapp/dialog/index",
"van-cell": "@vant/weapp/cell/index"
}
}

View File

@@ -0,0 +1,48 @@
<!--pages/workBench/components/reading/index.wxml-->
<van-field
value="{{ parkName }}"
placeholder="请选择园区"
label="园区"
readonly
border="{{ false }}"
use-button-slot
title-width="100rpx"
>
<van-button slot="button" size="small" type="primary" bind:click="onParkFocus">
选择
</van-button>
</van-field>
<search-select
show="{{show}}"
title="{{title}}"
type="{{type}}"
park="{{park}}"
bindconfirm="onConfirm"
bindcancel="onConcal"
/>
<van-cell
title="路线1"
label="包含12个抄表点"
>
<view slot="right-icon">
<!-- <van-icon name="search" class="search-icon" /> -->
<van-button type="primary" size="small" type="primary"> 去抄表 </van-button>
</view>
</van-cell>
<van-cell
title="路线2"
label="包含12个抄表点"
>
<view slot="right-icon">
<!-- <van-icon name="search" class="search-icon" /> -->
<van-button
type="primary"
size="small"
bind:tap="jumpToReading"
data-id="1234"
> 去抄表 </van-button>
</view>
</van-cell>

View File

@@ -0,0 +1 @@
/* pages/workBench/components/reading/index.wxss */

View File

@@ -5,7 +5,7 @@ Page({
* 页面的初始数据
*/
data: {
active: 0
active: 3
},
/**

View File

@@ -5,7 +5,8 @@
"navigator": "/components/navigator/index",
"approve": "./components/approve/index",
"recharge": "./components/recharge/index",
"record": "./components/record/index"
"record": "./components/record/index",
"reading": "./components/reading/index"
},
"navigationStyle": "custom"
}

View File

@@ -10,4 +10,7 @@
<van-tab title="审核">
<approve />
</van-tab>
<van-tab title="抄表">
<reading />
</van-tab>
</van-tabs>