调整工作台接口,处理特殊字符

This commit is contained in:
qiaomu 2024-11-18 17:09:07 +08:00
parent 84c6c54e58
commit 883461c852
7 changed files with 82 additions and 75 deletions

View File

@ -109,7 +109,7 @@ Component({
return return
} }
this.setData({ this.setData({
columns: parks?.map(item => `${item.meterNo}-${item.address}${item.tenement?.name ? '-' + item.tenement?.name : ''}`), columns: parks?.map(item => `${item.meterNo}-${item.address}${item.shortName ? '-' + item.shortName : ''}`),
list: parks, list: parks,
}) })
} }

View File

@ -1 +1,3 @@
/* components/searchSelect/index.wxss */ /* components/searchSelect/index.wxss */
.van-ellipsis van-picker-column__item {
}

View File

@ -23,7 +23,11 @@ Component({
keywordTemp: "", keywordTemp: "",
page: 1, page: 1,
}, },
lifetimes: {
attached() {
this.init();
}
},
/** /**
* 组件的方法列表 * 组件的方法列表
*/ */

View File

@ -14,82 +14,80 @@
</van-button> </van-button>
</van-field> </van-field>
<van-empty wx:if="{{!park}}" description="选择园区后查看" /> <van-field
<view wx:else> value="{{ keyword }}"
<van-field placeholder="请输入关键字"
value="{{ keyword }}" label="关键字"
placeholder="请输入关键字" border="{{ false }}"
label="关键字" use-button-slot
border="{{ false }}" bind:change="onChangeKeyword"
use-button-slot title-width="100rpx"
bind:change="onChangeKeyword" >
title-width="100rpx" <van-button slot="button" size="small" type="primary" bind:click="onSearch">
> 搜索
<van-button slot="button" size="small" type="primary" bind:click="onSearch"> </van-button>
搜索 </van-field>
</van-button> <view>
</van-field> <view wx:if="{{list.length}}">
<view> <view class="tableWrapper">
<view wx:if="{{list.length}}"> <view class="table">
<view class="tableWrapper"> <view class="thead">
<view class="table"> <view class="th" style="width: 70rpx"> </view>
<view class="thead"> <view class="th" style="width: 250rpx"> 商户名字 </view>
<view class="th" style="width: 70rpx"> </view> <view class="th" style="width: 150rpx"> 充值金额 </view>
<view class="th" style="width: 250rpx"> 商户名字 </view> <view class="th" style="width: 200rpx"> 操作 </view>
<view class="th" style="width: 150rpx"> 充值金额 </view> </view>
<view class="th" style="width: 200rpx"> 操作 </view> <view class="tbody">
</view> <van-radio-group value="{{ record }}" bind:change="onChangeSelectRecharge">
<view class="tbody"> <block wx:for="{{list}}" wx:for-index="itemIndex" wx:key="item">
<van-radio-group value="{{ record }}" bind:change="onChangeSelectRecharge"> <view class="tr">
<block wx:for="{{list}}" wx:for-index="itemIndex" wx:key="item"> <view class="th" style="width: 60rpx">
<view class="tr"> <van-radio wx:if="{{item.orderStatus !== '已退回'}}" name="{{item.id}}"></van-radio>
<view class="th" style="width: 60rpx"> </view>
<van-radio wx:if="{{item.orderStatus !== '已退回'}}" name="{{item.id}}"></van-radio> <view class="th" style="width: 200rpx"> {{ item.tenement.shortName }} </view>
</view> <view class="th" style="width: 200rpx"> {{ item.money }} </view>
<view class="th" style="width: 200rpx"> {{ item.tenement.shortName }} </view> <view class="th" style="width: 200rpx">
<view class="th" style="width: 200rpx"> {{ item.money }} </view> <view class="primaryTextBtn" bind:tap="jumpToDetail" data-id="{{item.id}}">
<view class="th" style="width: 200rpx"> 查看详细
<view class="primaryTextBtn" bind:tap="jumpToDetail" data-id="{{item.id}}">
查看详细
</view>
</view> </view>
</view> </view>
</block> </view>
</van-radio-group> </block>
</view> </van-radio-group>
</view> </view>
</view> </view>
<pagination
currentIndex="{{page}}"
totalPage="{{totalPage}}"
bind:pagingChange="onChangePage"
/>
</view> </view>
<empty bind:refresh="init" wx:else />
<view class="operate"> <pagination
<view style="margin-top: 60rpx; margin-bottom: 60rpx;display: flex; justify-content: center; align-items: center;"> currentIndex="{{page}}"
<van-button totalPage="{{totalPage}}"
type="info" bind:pagingChange="onChangePage"
size="small" />
style="margin-right: 30rpx;"
bind:click="handleApprove" </view>
data-status="0" <empty bind:refresh="init" wx:else />
disabled="{{!record}}" <view class="operate">
> 同意 </van-button> <view style="margin-top: 60rpx; margin-bottom: 60rpx;display: flex; justify-content: center; align-items: center;">
<van-button <van-button
size="small" type="info"
bind:click="handleClear" size="small"
disabled="{{!record}}" style="margin-right: 30rpx;"
bind:click="handleApprove" bind:click="handleApprove"
data-status="1" data-status="0"
> 拒绝 </van-button> disabled="{{!record}}"
</view> > 同意 </van-button>
<van-button
size="small"
bind:click="handleClear"
disabled="{{!record}}"
bind:click="handleApprove"
data-status="1"
> 拒绝 </van-button>
</view> </view>
</view> </view>
</view> </view>
<search-select <search-select
show="{{show}}" show="{{show}}"
title="{{title}}" title="{{title}}"

View File

@ -61,6 +61,9 @@ Component({
}, },
async init() { async init() {
const { page, keyword, park } = this.data; const { page, keyword, park } = this.data;
if (!park) {
return;
}
const { code, message, data, total } = await getParkMeterList({ park, keyword, page }) const { code, message, data, total } = await getParkMeterList({ park, keyword, page })
if (code !== OK) { if (code !== OK) {
alertInfo(message); alertInfo(message);

View File

@ -18,12 +18,12 @@ export const getTenementMeterList = async function(tid) {
// 获取某一园区下的电表列表 // 获取某一园区下的电表列表
export const getParkMeterList = async function({park = "", keyword = "", page = 1}) { export const getParkMeterList = async function({park = "", keyword = "", page = 1}) {
return await GET(`/equipment/getOperateMeterList?page=${page}&park=${park}&keyword=${keyword}`); return await GET(`/equipment/getOperateMeterList?page=${page}&park=${park}&keyword=${escape(keyword)}`);
} }
// 获取某一园区下的简洁电表列表 // 获取某一园区下的简洁电表列表
export const getParkSimpleMeterList = async function({park = "", keyword = "", page = 1}) { export const getParkSimpleMeterList = async function({park = "", keyword = "", page = 1}) {
return await GET(`/work/getWorkMeter?page=${page}&park=${park}&keyword=${keyword}`); return await GET(`/work/getWorkMeter?page=${page}&park=${park}&keyword=${escape(keyword)}`);
} }

View File

@ -33,8 +33,8 @@ export const handleRecharge = async function(park, data) {
} }
// 获取后台审核列表 // 获取后台审核列表
export const getRechargeApproveList = async function({park, page, keyword}) { export const getRechargeApproveList = async function({park = "", page, keyword}) {
return await GET(`/wx/getTopExamineList?park=${park}&page=${page}&keyword=${keyword}`) return await GET(`/wx/getTopExamineList?park=${park}&page=${page}&keyword=${escape(keyword)}`)
} }
// 对公审核 // 对公审核