bug修改 排序修改
This commit is contained in:
parent
f1eee059b6
commit
02e85a6d72
|
@ -1583,6 +1583,8 @@ export default {
|
||||||
}, 700);
|
}, 700);
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
// 新增辅助方法处理状态消息
|
// 新增辅助方法处理状态消息
|
||||||
getStatusMessage(status) {
|
getStatusMessage(status) {
|
||||||
const messages = {
|
const messages = {
|
||||||
|
@ -1679,6 +1681,10 @@ export default {
|
||||||
this.bulepayback = false
|
this.bulepayback = false
|
||||||
this.payback()
|
this.payback()
|
||||||
}
|
}
|
||||||
|
if(this.bulebindcar){
|
||||||
|
this.bulebindcar = false
|
||||||
|
this.bluesub1()
|
||||||
|
}
|
||||||
// bulepayback: false,
|
// bulepayback: false,
|
||||||
// bulebindcar: false,
|
// bulebindcar: false,
|
||||||
},
|
},
|
||||||
|
|
|
@ -3,27 +3,15 @@
|
||||||
<u-navbar title="设备管理" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
|
<u-navbar title="设备管理" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
|
||||||
height='45'></u-navbar>
|
height='45'></u-navbar>
|
||||||
<view class="tap">
|
<view class="tap">
|
||||||
<!-- <view class="tap_cont " :class="curtitidx==0?'act1':''" @click="changeidx(0)">
|
|
||||||
投放中设备
|
|
||||||
</view>
|
|
||||||
<view class="tap_cont" :class="curtitidx==1?'act1':''" @click="changeidx(1)">
|
|
||||||
仓库中设备
|
|
||||||
</view> -->
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="" style="background: #FFFFFF;width: 750rpx;padding-bottom: 36rpx;">
|
<view class="" style="background: #FFFFFF;width: 750rpx;padding-bottom: 36rpx;">
|
||||||
|
|
||||||
<view class="top_box" style="margin-top: 20rpx;">
|
<view class="top_box" style="margin-top: 20rpx;">
|
||||||
<!-- <view class="left_text" @click="show=true">
|
|
||||||
{{tit}} <view class="iconfont icon-xiangxia1"></view>
|
|
||||||
</view> -->
|
|
||||||
<view class="sear_ipt">
|
<view class="sear_ipt">
|
||||||
<input type="text"
|
<input type="text" v-model="searchKeyword" placeholder="请输入SN码" class="input"
|
||||||
v-model="searchKeyword"
|
placeholder-style="color:#C7CDD3" @input="search()">
|
||||||
placeholder="请输入SN码"
|
|
||||||
class="input"
|
|
||||||
placeholder-style="color:#C7CDD3"
|
|
||||||
@input="search()">
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
@ -37,19 +25,25 @@
|
||||||
{{ sctit }}
|
{{ sctit }}
|
||||||
<view class="iconfont icon-xiangxia1"></view>
|
<view class="iconfont icon-xiangxia1"></view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="stause_li" style="margin-left: 50rpx;" @click="showtype = true">
|
||||||
|
{{ typeSortLabel }}
|
||||||
|
<view class="iconfont icon-xiangxia1"></view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="info_card" style="margin-top: 20rpx;" v-for="(item,index) in filteredList" :key="index" @click.stop="todetail(item)">
|
<view class="info_card" style="margin-top: 20rpx;" v-for="(item, index) in filteredList" :key="index"
|
||||||
|
@click.stop="todetail(item)">
|
||||||
<view class="info_tit" style="margin-left: 36rpx;">
|
<view class="info_tit" style="margin-left: 36rpx;">
|
||||||
<view class="tit_right" :style="{ color: getStatusColors(item) }" style="margin-left: 0rpx;margin-right: 20rpx;">
|
<view class="tit_right" :style="{ color: getStatusColors(item) }"
|
||||||
|
style="margin-left: 0rpx;margin-right: 20rpx;">
|
||||||
|
|
||||||
<view class="yuan" :style="{ background: getStatusColors(item) }"></view>
|
<view class="yuan" :style="{ background: getStatusColors(item) }"></view>
|
||||||
{{ statuss(item) }}
|
{{ statuss(item) }}
|
||||||
</view>
|
</view>
|
||||||
<view class="tit_left" v-if="stepindex == 1">
|
<view class="tit_left" v-if="stepindex == 1">
|
||||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/uTuWiPEViwzaPPHAgjdN" mode=""
|
<image src="https://lxnapi.ccttiot.com/bike/img/static/uTuWiPEViwzaPPHAgjdN" mode="aspectFit"
|
||||||
v-if="!isSelected(item.sn)" @click.stop="selectItem(item.sn)"></image>
|
v-if="!isSelected(item.sn)" @click.stop="selectItem(item.sn)"></image>
|
||||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/uGY25CNyW7Vz0LJcOYtS" mode=""
|
<image src="https://lxnapi.ccttiot.com/bike/img/static/uGY25CNyW7Vz0LJcOYtS" mode="aspectFit"
|
||||||
v-if="isSelected(item.sn)" @click.stop="deselectItem(item.sn)"></image>
|
v-if="isSelected(item.sn)" @click.stop="deselectItem(item.sn)"></image>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
@ -108,7 +102,7 @@
|
||||||
<view class="top_left" @click="selectAll">
|
<view class="top_left" @click="selectAll">
|
||||||
<image
|
<image
|
||||||
:src="isAllSelected ? 'https://lxnapi.ccttiot.com/bike/img/static/uGY25CNyW7Vz0LJcOYtS' : 'https://lxnapi.ccttiot.com/bike/img/static/uTuWiPEViwzaPPHAgjdN'"
|
:src="isAllSelected ? 'https://lxnapi.ccttiot.com/bike/img/static/uGY25CNyW7Vz0LJcOYtS' : 'https://lxnapi.ccttiot.com/bike/img/static/uTuWiPEViwzaPPHAgjdN'"
|
||||||
mode=""></image>
|
mode="aspectFit"></image>
|
||||||
{{ isAllSelected ? '取消全选' : '全选' }}
|
{{ isAllSelected ? '取消全选' : '全选' }}
|
||||||
</view>
|
</view>
|
||||||
<view class="top_right">
|
<view class="top_right">
|
||||||
|
@ -143,7 +137,8 @@
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<u-select v-model="show" :list="list" title='设备状态' @confirm="confirm"></u-select>
|
<u-select v-model="show" :list="list" title='设备状态' @confirm="confirm"></u-select>
|
||||||
<u-select v-model="showdsc" :list="lists" title='剩余电量' @confirm="confirms"></u-select>
|
<u-select v-model="showdsc" :list="lists" title='排序方式' @confirm="confirms"></u-select>
|
||||||
|
<u-select v-model="showtype" :list="sortTypeList" title='排序选择' @confirm="confirmSortType"></u-select>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -156,9 +151,25 @@
|
||||||
backgroundColor: "#fff",
|
backgroundColor: "#fff",
|
||||||
},
|
},
|
||||||
showdsc: false,
|
showdsc: false,
|
||||||
sctit: '从高到低',
|
sctit: '从低到高',
|
||||||
scidx: 'desc',
|
scidx: 'asc',
|
||||||
show: false,
|
show: false,
|
||||||
|
showtype: false,
|
||||||
|
typeSort: '1',
|
||||||
|
typeSortLabel: 'SN码排序',
|
||||||
|
// 添加排序类型列表
|
||||||
|
sortTypeList: [{
|
||||||
|
value: '1',
|
||||||
|
label: 'SN码排序'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '2',
|
||||||
|
label: '车型排序'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '3',
|
||||||
|
label: '车牌号排序'
|
||||||
|
}],
|
||||||
lists: [{
|
lists: [{
|
||||||
value: 'desc',
|
value: 'desc',
|
||||||
label: '从高到低'
|
label: '从高到低'
|
||||||
|
@ -212,11 +223,6 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad() {
|
onLoad() {
|
||||||
// if(uni.getStorageSync('adminAreaid')){
|
|
||||||
// this.areaId = uni.getStorageSync('adminAreaid')
|
|
||||||
// this.getDevice()
|
|
||||||
// }
|
|
||||||
|
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
if (uni.getStorageSync('adminAreaid')) {
|
if (uni.getStorageSync('adminAreaid')) {
|
||||||
|
@ -254,6 +260,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
// 添加新的排序类型确认方法
|
||||||
|
confirmSortType(e) {
|
||||||
|
this.typeSort = e[0].value
|
||||||
|
this.typeSortLabel = e[0].label
|
||||||
|
this.getDevice()
|
||||||
|
},
|
||||||
ban() {
|
ban() {
|
||||||
let data = {
|
let data = {
|
||||||
disableType: 'disable',
|
disableType: 'disable',
|
||||||
|
@ -331,22 +343,27 @@
|
||||||
this.getDevice()
|
this.getDevice()
|
||||||
},
|
},
|
||||||
getStatusColor(item) {
|
getStatusColor(item) {
|
||||||
// if (item.onlineStatus == 0) {
|
|
||||||
// // 离线状态为红色
|
|
||||||
// return 'red';
|
|
||||||
// } else
|
|
||||||
if (item.status == 0 || item.status == 8) {
|
if (item.status == 0 || item.status == 8) {
|
||||||
// 下线和未上架状态为灰色
|
return '#808080'; // 下线和未上架状态为灰色
|
||||||
return 'gray';
|
} else if (item.status == 1) {
|
||||||
} else {
|
return '#28a745'; // 待租状态为绿色
|
||||||
// 其他状态为蓝色
|
} else if (item.status == 2) {
|
||||||
// return 'blue';
|
return '#ff8c00'; // 预约中状态为橙色
|
||||||
|
} else if (item.status == 3) {
|
||||||
|
return '#007bff'; // 骑行中状态为蓝色
|
||||||
|
} else if (item.status == 4) {
|
||||||
|
return '#ffc107'; // 临时锁车中状态为黄色
|
||||||
|
} else if (item.status == 6) {
|
||||||
|
return '#6f42c1'; // 调度中状态为紫色
|
||||||
|
} else if (item.status == 7) {
|
||||||
|
return '#343a40'; // 未绑定状态为黑色
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getStatusColors(item) {
|
getStatusColors(item) {
|
||||||
if (item.onlineStatus == 0) {
|
if (item.onlineStatus == 0) {
|
||||||
// 离线状态为红色
|
return '#dc3545'; // 离线状态为红色
|
||||||
return 'red';
|
} else {
|
||||||
|
return '#28a745'; // 在线状态为绿色
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
closestep() {
|
closestep() {
|
||||||
|
@ -406,12 +423,11 @@
|
||||||
},
|
},
|
||||||
getDevice() {
|
getDevice() {
|
||||||
let data = {
|
let data = {
|
||||||
powerStart: '',
|
|
||||||
powerEnd: '',
|
|
||||||
sort: this.scidx,
|
sort: this.scidx,
|
||||||
status: this.typeidx,
|
status: this.typeidx,
|
||||||
areaId: this.areaId
|
areaId: this.areaId,
|
||||||
|
typeSort: this.typeSort
|
||||||
}
|
}
|
||||||
|
|
||||||
this.selectedItems = [];
|
this.selectedItems = [];
|
||||||
|
@ -450,6 +466,7 @@
|
||||||
|
|
||||||
.page {
|
.page {
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
|
|
||||||
.top_box {
|
.top_box {
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -473,6 +490,7 @@
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #3D3D3D;
|
color: #3D3D3D;
|
||||||
|
|
||||||
.icon-xiangxia1 {
|
.icon-xiangxia1 {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
}
|
}
|
||||||
|
@ -510,6 +528,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.info_card {
|
.info_card {
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
|
|
||||||
|
@ -585,6 +604,7 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
/* 超出部分隐藏 */
|
/* 超出部分隐藏 */
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
color: #3D3D3D;
|
color: #3D3D3D;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user