first commit
This commit is contained in:
66
unpackage/dist/dev/mp-alipay/pages/piles/piles.acss
vendored
Normal file
66
unpackage/dist/dev/mp-alipay/pages/piles/piles.acss
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
.piles_card.data-v-3d8d5798 {
|
||||
width: 690rpx;
|
||||
height: 192rpx;
|
||||
background: linear-gradient(179deg, #4874e5 0%, #3864d6 100%);
|
||||
border-radius: 8rpx 8rpx 0rpx 0rpx;
|
||||
padding: 30rpx;
|
||||
}
|
||||
.piles_card_title.data-v-3d8d5798 {
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #ffffff;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.piles_card_view.data-v-3d8d5798 {
|
||||
padding: 0 150rpx;
|
||||
flex-direction: column;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.piles_card_view view.data-v-3d8d5798 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.piles_card_view view text.data-v-3d8d5798:nth-child(1) {
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #ffffff;
|
||||
margin-bottom: 15rpx;
|
||||
}
|
||||
.piles_card_view view text.data-v-3d8d5798:nth-child(2) {
|
||||
font-size: 26rpx;
|
||||
color: #ffffff;
|
||||
}
|
||||
.piles_list.data-v-3d8d5798 {
|
||||
padding: 25rpx;
|
||||
width: 690rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.piles_list_title.data-v-3d8d5798 {
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #232323;
|
||||
}
|
||||
.piles_list_view.data-v-3d8d5798 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: start;
|
||||
color: #555555;
|
||||
font-size: 28rpx;
|
||||
margin-top: 15rpx;
|
||||
}
|
||||
.piles_list_view view.data-v-3d8d5798:nth-child(2) {
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #232323;
|
||||
}
|
||||
.piles_list_view text.data-v-3d8d5798 {
|
||||
color: #ff2727;
|
||||
}
|
||||
1
unpackage/dist/dev/mp-alipay/pages/piles/piles.axml
vendored
Normal file
1
unpackage/dist/dev/mp-alipay/pages/piles/piles.axml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="p30 piles data-v-3d8d5798"><z-paging class="data-v-3d8d5798" u-s="{{['d']}}" ref="__r" u-r="{{h}}" onQuery="{{i}}" u-i="3d8d5798-0" onVI="__l" onUpdateModelValue="{{j}}" u-p="{{k}}"><view class="piles_card data-v-3d8d5798"><view class="piles_card_title data-v-3d8d5798">充电桩汇总</view><view class="piles_card_view data-v-3d8d5798"><view class="data-v-3d8d5798"><text class="data-v-3d8d5798">{{a}}</text><text class="data-v-3d8d5798">已安装</text></view><view class="data-v-3d8d5798"><text class="data-v-3d8d5798">{{b}}</text><text class="data-v-3d8d5798">未安装数量</text></view></view></view><up-subsection class="data-v-3d8d5798" onChange="{{c}}" u-i="3d8d5798-1,3d8d5798-0" onVI="__l" u-p="{{d}}"></up-subsection><view a:for="{{e}}" a:for-item="i" a:key="i" class="order_view data-v-3d8d5798"><view a:if="{{f}}" class="piles_list data-v-3d8d5798"><view class="piles_list_title data-v-3d8d5798">安装电站:{{i.a}}</view><view class="piles_list_view data-v-3d8d5798"><view class="data-v-3d8d5798">设备ID:</view><view class="data-v-3d8d5798">{{i.b}}</view></view><view class="piles_list_view data-v-3d8d5798"><view class="data-v-3d8d5798">设备功率:</view><view class="data-v-3d8d5798">{{i.c}}KW</view></view><view class="piles_list_view data-v-3d8d5798">地址:{{i.d}}</view><view class="piles_list_view data-v-3d8d5798"><view class="data-v-3d8d5798">下单时间:</view><view class="data-v-3d8d5798">{{i.e}}</view></view></view><view a:if="{{g}}" class="piles_list data-v-3d8d5798"><view class="piles_list_view data-v-3d8d5798"><view class="data-v-3d8d5798">设备ID:</view><view class="data-v-3d8d5798">{{i.f}}</view></view><view class="piles_list_view data-v-3d8d5798"><view class="data-v-3d8d5798">设备功率:</view><view class="data-v-3d8d5798">{{i.g}}KW</view></view><view class="piles_list_view data-v-3d8d5798"><view class="data-v-3d8d5798">下单时间:</view><view class="data-v-3d8d5798">{{i.h}}</view></view></view></view></z-paging></view>
|
||||
119
unpackage/dist/dev/mp-alipay/pages/piles/piles.js
vendored
Normal file
119
unpackage/dist/dev/mp-alipay/pages/piles/piles.js
vendored
Normal file
@@ -0,0 +1,119 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const api_api = require("../../api/api.js");
|
||||
require("../../uni_modules/uview-plus/index.js");
|
||||
const uni_modules_uviewPlus_libs_function_index = require("../../uni_modules/uview-plus/libs/function/index.js");
|
||||
if (!Array) {
|
||||
const _easycom_up_subsection2 = common_vendor.resolveComponent("up-subsection");
|
||||
const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging");
|
||||
(_easycom_up_subsection2 + _easycom_z_paging2)();
|
||||
}
|
||||
const _easycom_up_subsection = () => "../../uni_modules/uview-plus/components/u-subsection/u-subsection.js";
|
||||
const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js";
|
||||
if (!Math) {
|
||||
(_easycom_up_subsection + _easycom_z_paging)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "piles",
|
||||
setup(__props) {
|
||||
const paging = common_vendor.ref(null);
|
||||
let dataList = common_vendor.ref([]);
|
||||
let dataFrom = common_vendor.reactive({
|
||||
deviceStatus: 1
|
||||
});
|
||||
let count = common_vendor.ref({});
|
||||
common_vendor.onLoad(async () => {
|
||||
count.value = await api_api.getDeviceCount();
|
||||
});
|
||||
let isPagingRefNotFound = () => {
|
||||
return !paging.value;
|
||||
};
|
||||
common_vendor.onPullDownRefresh(() => {
|
||||
if (isPagingRefNotFound())
|
||||
return;
|
||||
paging.value.reload().catch(() => {
|
||||
});
|
||||
});
|
||||
common_vendor.onPageScroll((e) => {
|
||||
if (isPagingRefNotFound())
|
||||
return;
|
||||
paging.value.updatePageScrollTop(e.scrollTop);
|
||||
e.scrollTop < 10 && paging.value.doChatRecordLoadMore();
|
||||
});
|
||||
common_vendor.onReachBottom(() => {
|
||||
if (isPagingRefNotFound())
|
||||
return;
|
||||
paging.value.pageReachBottom();
|
||||
});
|
||||
const queryList = (pageNo, pageSize) => {
|
||||
const params = {
|
||||
current: pageNo,
|
||||
pageSize,
|
||||
...dataFrom
|
||||
};
|
||||
api_api.getDeviceInfo(params).then((res) => {
|
||||
paging.value.complete(res.records);
|
||||
}).catch((res) => {
|
||||
paging.value.complete(false);
|
||||
});
|
||||
};
|
||||
const list = common_vendor.ref([
|
||||
{
|
||||
name: "已安装",
|
||||
id: 1
|
||||
},
|
||||
{
|
||||
name: "待安装",
|
||||
id: 0
|
||||
}
|
||||
]);
|
||||
const current = common_vendor.ref(0);
|
||||
const upChange = (e) => {
|
||||
current.value = e;
|
||||
dataFrom.deviceStatus = list.value[e].id;
|
||||
paging.value.reload();
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.t(common_vendor.unref(count).installCount || 0),
|
||||
b: common_vendor.t(common_vendor.unref(count).installNotCount || 0),
|
||||
c: common_vendor.o(upChange),
|
||||
d: common_vendor.p({
|
||||
list: list.value,
|
||||
keyName: "name",
|
||||
current: current.value
|
||||
}),
|
||||
e: common_vendor.f(common_vendor.unref(dataList), (i, k0, i0) => {
|
||||
return common_vendor.e(current.value == 0 ? {
|
||||
a: common_vendor.t(i.stationName || "-"),
|
||||
b: common_vendor.t(i.id),
|
||||
c: common_vendor.t(i.deviceType),
|
||||
d: common_vendor.t(i.stationAddress || "-"),
|
||||
e: common_vendor.t(common_vendor.unref(uni_modules_uviewPlus_libs_function_index.timeFormat)(new Date(i.createTime).getTime(), "yyyy-mm-dd hh:MM"))
|
||||
} : {}, current.value == 1 ? {
|
||||
f: common_vendor.t(i.id),
|
||||
g: common_vendor.t(i.deviceType),
|
||||
h: common_vendor.t(common_vendor.unref(uni_modules_uviewPlus_libs_function_index.timeFormat)(new Date(i.createTime).getTime(), "yyyy-mm-dd hh:MM"))
|
||||
} : {}, {
|
||||
i
|
||||
});
|
||||
}),
|
||||
f: current.value == 0,
|
||||
g: current.value == 1,
|
||||
h: () => ({
|
||||
r: paging,
|
||||
k: "paging"
|
||||
}),
|
||||
i: common_vendor.o(queryList),
|
||||
j: common_vendor.o(($event) => common_vendor.isRef(dataList) ? dataList.value = $event : dataList = $event),
|
||||
k: common_vendor.p({
|
||||
["use-page-scroll"]: true,
|
||||
modelValue: common_vendor.unref(dataList)
|
||||
})
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-3d8d5798"]]);
|
||||
_sfc_main.__runtimeHooks = 1;
|
||||
my.createPage(MiniProgramPage);
|
||||
7
unpackage/dist/dev/mp-alipay/pages/piles/piles.json
vendored
Normal file
7
unpackage/dist/dev/mp-alipay/pages/piles/piles.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"defaultTitle": "我的充电桩",
|
||||
"usingComponents": {
|
||||
"up-subsection": "../../uni_modules/uview-plus/components/u-subsection/u-subsection",
|
||||
"z-paging": "../../uni_modules/z-paging/components/z-paging/z-paging"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user