Commit 4afe7367 by 姜雷

Merge branch 'test'

parents d124803f 1414dbe7
...@@ -52,5 +52,6 @@ export const baseFetch = (req: wx.RequestOption) => ...@@ -52,5 +52,6 @@ export const baseFetch = (req: wx.RequestOption) =>
fetch({ ...req, url: masterUrl.BASE_SERVER_URL + req.url }); fetch({ ...req, url: masterUrl.BASE_SERVER_URL + req.url });
export const operatorFetch = (req: wx.RequestOption) => export const operatorFetch = (req: wx.RequestOption) =>
fetch({ ...req, url: masterUrl.OPERATOR_SERVER_URL + req.url }); fetch({ ...req, url: masterUrl.OPERATOR_SERVER_URL + req.url });
export const deviceFetch = (req: wx.RequestOption) =>
fetch({ ...req, url: masterUrl.DEVICE_SERVEL_URL + req.url });
export default fetch; export default fetch;
...@@ -9,7 +9,10 @@ ...@@ -9,7 +9,10 @@
"pages/userGrowth/userGrowth", "pages/userGrowth/userGrowth",
"pages/areaSelect/areaSelect", "pages/areaSelect/areaSelect",
"pages/platformFee/platformFee", "pages/platformFee/platformFee",
"pages/platformFeeRecord/platformFeeRecord" "pages/platformFeeRecord/platformFeeRecord",
"pages/equipment/equipment",
"pages/equipmentReport/equipmentReport",
"pages/feedbackDetail/feedbackDetail"
], ],
"window": { "window": {
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
......
...@@ -6,6 +6,7 @@ exports.devUrl = { ...@@ -6,6 +6,7 @@ exports.devUrl = {
CUSTOMER_SERVER_URL: 'https://ex-dev-customer-manage.168cad.top', CUSTOMER_SERVER_URL: 'https://ex-dev-customer-manage.168cad.top',
BASE_SERVER_URL: 'https://ex-dev-dcxy-base-manage.168cad.top', BASE_SERVER_URL: 'https://ex-dev-dcxy-base-manage.168cad.top',
OPERATOR_SERVER_URL: 'https://dev-op-man-serv.168cad.top', OPERATOR_SERVER_URL: 'https://dev-op-man-serv.168cad.top',
DEVICE_SERVEL_URL: 'https://in-dev-device-management-api.168cad.top',
}; };
exports.testUrl = { exports.testUrl = {
SYSTEM_SERVER_URL: 'https://ex-test-dcxy-system-manage.168cad.top', SYSTEM_SERVER_URL: 'https://ex-test-dcxy-system-manage.168cad.top',
...@@ -13,6 +14,7 @@ exports.testUrl = { ...@@ -13,6 +14,7 @@ exports.testUrl = {
CUSTOMER_SERVER_URL: 'https://ex-test-customer-manage.168cad.top', CUSTOMER_SERVER_URL: 'https://ex-test-customer-manage.168cad.top',
BASE_SERVER_URL: 'https://ex-test-dcxy-base-manage.168cad.top', BASE_SERVER_URL: 'https://ex-test-dcxy-base-manage.168cad.top',
OPERATOR_SERVER_URL: 'https://test-op-man-serv.168cad.top', OPERATOR_SERVER_URL: 'https://test-op-man-serv.168cad.top',
DEVICE_SERVEL_URL: 'https://in-test-device-management-api.168cad.top',
}; };
exports.masterUrl = { exports.masterUrl = {
SYSTEM_SERVER_URL: 'https://dcxy-system-manage.dcrym.com', SYSTEM_SERVER_URL: 'https://dcxy-system-manage.dcrym.com',
...@@ -20,7 +22,8 @@ exports.masterUrl = { ...@@ -20,7 +22,8 @@ exports.masterUrl = {
CUSTOMER_SERVER_URL: 'https://dcxy-customer-manage.dcrym.com', CUSTOMER_SERVER_URL: 'https://dcxy-customer-manage.dcrym.com',
BASE_SERVER_URL: 'https://dcxy-base-manage.dcrym.com', BASE_SERVER_URL: 'https://dcxy-base-manage.dcrym.com',
OPERATOR_SERVER_URL: 'https://op-man-serv.dcrym.com', OPERATOR_SERVER_URL: 'https://op-man-serv.dcrym.com',
DEVICE_SERVEL_URL: 'https://device-management-api.dcrym.com',
}; };
exports.successCode = 1000; exports.successCode = 1000;
exports.logoutode = -2; exports.logoutode = -2;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiY29uc3RhbnRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQWEsUUFBQSxNQUFNLEdBQUc7SUFDcEIsaUJBQWlCLEVBQUUsOENBQThDO0lBQ2pF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ZS4xNjhjYWQudG9wJyxcbiAgT1BFUkFUT1JfU0VSVkVSX1VSTDogJ2h0dHBzOi8vdGVzdC1vcC1tYW4tc2Vydi4xNjhjYWQudG9wJyxcbiAgREVWSUNFX1NFUlZFTF9VUkw6ICdodHRwczovL2luLXRlc3QtZGV2aWNlLW1hbmFnZW1lbnQtYXBpLjE2OGNhZC50b3AnLFxufTtcbmV4cG9ydCBjb25zdCBtYXN0ZXJVcmwgPSB7XG4gIFNZU1RFTV9TRVJWRVJfVVJMOiAnaHR0cHM6Ly9kY3h5LXN5c3RlbS1tYW5hZ2UuZGNyeW0uY29tJyxcbiAgU1RBVElTVElDU19TRVJWRVJfVVJMOiAnaHR0cHM6Ly9kY3h5LXN0YXRpc3RpY3MtbWFuYWdlLmRjcnltLmNvbScsXG4gIENVU1RPTUVSX1NFUlZFUl9VUkw6ICdodHRwczovL2RjeHktY3VzdG9tZXItbWFuYWdlLmRjcnltLmNvbScsXG4gIEJBU0VfU0VSVkVSX1VSTDogJ2h0dHBzOi8vZGN4eS1iYXNlLW1hbmFnZS5kY3J5bS5jb20nLFxuICBPUEVSQVRPUl9TRVJWRVJfVVJMOiAnaHR0cHM6Ly9vcC1tYW4tc2Vydi5kY3J5bS5jb20nLFxuICBERVZJQ0VfU0VSVkVMX1VSTDogJ2h0dHBzOi8vZGV2aWNlLW1hbmFnZW1lbnQtYXBpLmRjcnltLmNvbScsXG59O1xuXG5leHBvcnQgY29uc3Qgc3VjY2Vzc0NvZGUgPSAxMDAwO1xuZXhwb3J0IGNvbnN0IGxvZ291dG9kZSA9IC0yO1xuIl19
\ No newline at end of file \ No newline at end of file
...@@ -4,6 +4,7 @@ export const devUrl = { ...@@ -4,6 +4,7 @@ export const devUrl = {
CUSTOMER_SERVER_URL: 'https://ex-dev-customer-manage.168cad.top', CUSTOMER_SERVER_URL: 'https://ex-dev-customer-manage.168cad.top',
BASE_SERVER_URL: 'https://ex-dev-dcxy-base-manage.168cad.top', BASE_SERVER_URL: 'https://ex-dev-dcxy-base-manage.168cad.top',
OPERATOR_SERVER_URL: 'https://dev-op-man-serv.168cad.top', OPERATOR_SERVER_URL: 'https://dev-op-man-serv.168cad.top',
DEVICE_SERVEL_URL: 'https://in-dev-device-management-api.168cad.top',
}; };
export const testUrl = { export const testUrl = {
SYSTEM_SERVER_URL: 'https://ex-test-dcxy-system-manage.168cad.top', SYSTEM_SERVER_URL: 'https://ex-test-dcxy-system-manage.168cad.top',
...@@ -11,6 +12,7 @@ export const testUrl = { ...@@ -11,6 +12,7 @@ export const testUrl = {
CUSTOMER_SERVER_URL: 'https://ex-test-customer-manage.168cad.top', CUSTOMER_SERVER_URL: 'https://ex-test-customer-manage.168cad.top',
BASE_SERVER_URL: 'https://ex-test-dcxy-base-manage.168cad.top', BASE_SERVER_URL: 'https://ex-test-dcxy-base-manage.168cad.top',
OPERATOR_SERVER_URL: 'https://test-op-man-serv.168cad.top', OPERATOR_SERVER_URL: 'https://test-op-man-serv.168cad.top',
DEVICE_SERVEL_URL: 'https://in-test-device-management-api.168cad.top',
}; };
export const masterUrl = { export const masterUrl = {
SYSTEM_SERVER_URL: 'https://dcxy-system-manage.dcrym.com', SYSTEM_SERVER_URL: 'https://dcxy-system-manage.dcrym.com',
...@@ -18,6 +20,7 @@ export const masterUrl = { ...@@ -18,6 +20,7 @@ export const masterUrl = {
CUSTOMER_SERVER_URL: 'https://dcxy-customer-manage.dcrym.com', CUSTOMER_SERVER_URL: 'https://dcxy-customer-manage.dcrym.com',
BASE_SERVER_URL: 'https://dcxy-base-manage.dcrym.com', BASE_SERVER_URL: 'https://dcxy-base-manage.dcrym.com',
OPERATOR_SERVER_URL: 'https://op-man-serv.dcrym.com', OPERATOR_SERVER_URL: 'https://op-man-serv.dcrym.com',
DEVICE_SERVEL_URL: 'https://device-management-api.dcrym.com',
}; };
export const successCode = 1000; export const successCode = 1000;
......
"use strict";
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
Component({
properties: {
colors: {
type: Array,
value: ['#6895fe'],
},
dataList: {
type: Array,
value: [],
observer: function (newVal) {
var maxnum = Math.ceil(Math.max.apply(Math, newVal.map(function (item) { return item.value; })) / 0.9);
var list = newVal.map(function (item) { return (__assign({}, item, { precent: Math.ceil((item.value / maxnum) * 100) })); });
this.setData({
list: list,
});
},
},
},
data: {
list: [],
},
methods: {},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRXF1aXBtZW50Q2hhcnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJFcXVpcG1lbnRDaGFydC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7QUFDQSxTQUFTLENBQUM7SUFJUixVQUFVLEVBQUU7UUFDVixNQUFNLEVBQUU7WUFDTixJQUFJLEVBQUUsS0FBSztZQUNYLEtBQUssRUFBRSxDQUFDLFNBQVMsQ0FBQztTQUNuQjtRQUNELFFBQVEsRUFBRTtZQUNSLElBQUksRUFBRSxLQUFLO1lBQ1gsS0FBSyxFQUFFLEVBQUU7WUFDVCxRQUFRLFlBQUMsTUFBTTtnQkFDYixJQUFJLE1BQU0sR0FBRyxJQUFJLENBQUMsSUFBSSxDQUNwQixJQUFJLENBQUMsR0FBRyxPQUFSLElBQUksRUFBUSxNQUFNLENBQUMsR0FBRyxDQUFDLFVBQUEsSUFBSSxJQUFJLE9BQUEsSUFBSSxDQUFDLEtBQUssRUFBVixDQUFVLENBQUMsSUFBSSxHQUFHLENBQ2xELENBQUM7Z0JBQ0YsSUFBSSxJQUFJLEdBQUcsTUFBTSxDQUFDLEdBQUcsQ0FBQyxVQUFBLElBQUksSUFBSSxPQUFBLGNBQ3pCLElBQUksSUFDUCxPQUFPLEVBQUUsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDLElBQUksQ0FBQyxL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ICAgIH0sXG4gIH0sXG5cbiAgLyoqXG4gICAqIOe7hOS7tueahOWIneWni+aVsOaNrlxuICAgKi9cbiAgZGF0YToge1xuICAgIGxpc3Q6IFtdLFxuICB9LFxuXG4gIC8qKlxuICAgKiDnu4Tku7bnmoTmlrnms5XliJfooahcbiAgICovXG4gIG1ldGhvZHM6IHt9LFxufSk7XG4iXX0=
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
// pages/components/EquipmentChart/EquipmentChart.js
Component({
/**
* 组件的属性列表
*/
properties: {
colors: {
type: Array,
value: ['#6895fe'],
},
dataList: {
type: Array,
value: [],
observer(newVal) {
let maxnum = Math.ceil(
Math.max(...newVal.map(item => item.value)) / 0.9,
);
let list = newVal.map(item => ({
...item,
precent: Math.ceil((item.value / maxnum) * 100),
}));
this.setData({
list,
});
},
},
},
/**
* 组件的初始数据
*/
data: {
list: [],
},
/**
* 组件的方法列表
*/
methods: {},
});
<!-- pages/components/EquipmentChart/EquipmentChart.wxml -->
<view class="EquipmentChart">
<view wx:for="{{list}}" wx:key="key" class="EquipmentChart-item">
<view class="EquipmentChart-name">{{item.key}}</view>
<view class="EquipmentChart-precent">
<view class="EquipmentChart-innerprecent" style="width: {{item.precent}}%;background-color: {{index < colors.length - 1 ? colors[index] : colors[index%colors.length]}}"></view>
</view>
<view class="EquipmentChart-count">{{item.value}}台</view>
</view>
</view>
\ No newline at end of file
/* pages/components/EquipmentChart/EquipmentChart.wxss */
.EquipmentChart {
padding-bottom: 20rpx;
}
.EquipmentChart-item {
display: flex;
align-items: center;
padding-bottom: 20rpx;
}
.EquipmentChart-name {
margin-right: 20rpx;
}
.EquipmentChart-precent,
.EquipmentChart-innerprecent {
width: 460rpx;
height: 12rpx;
border-radius: 12rpx;
}
.EquipmentChart-precent {
background-color: #f2f2f2;
}
.EquipmentChart-innerprecent {
width: 0;
background-color: #6f96f6;
}
.EquipmentChart-count {
flex: 1;
text-align: right;
}
{
"component": true,
"usingComponents": {
"c-select": "../Select/Select",
"price-and-count": "../components/PriceAndCount/PriceAndCount"
}
}
import { statisticsFetch } from '../../../api/fetch';
// pages/components/EquipmentOperationDetails/EquipmentOperationDetails.js
Component({
lifetimes: {
attached() {},
},
/**
* 组件的属性列表
*/
properties: {
totalAmount: {
type: Array,
value: [],
},
areaId: {
type: Number,
value: 0,
observer() {
this.fetchData();
this.refreshList();
},
},
},
/**
* 组件的初始数据
*/
data: {
sortTypeOptions: [
{ value: 'desc', label: '降序' },
{ value: 'asc', label: '升序' },
],
sortTypeIndex: '0',
sortType: 'desc',
timeType: 0,
comsumerData: {
title: '消费总额',
numberType: 'price',
count: 0,
},
countData: {
title: '消费笔数',
numberType: 'count',
count: 0,
},
pageNum: 1,
pageSize: 15,
dataList: [],
deviceType: 3, // (2:洗衣,3:饮水,4:吹风,5:洗浴)
},
/**
* 组件的方法列表
*/
methods: {
changeType(e) {
console.log(e);
const { timetype } = e.currentTarget.dataset;
if (timetype === this.data.timeType) return;
this.setData({
timeType: timetype,
});
this.fetchData();
this.refreshList();
},
fetchData() {
statisticsFetch({
url: '/boss/device/operation/data/summary',
method: 'POST',
data: {
areaId: this.data.areaId,
timeType: this.data.timeType,
},
})
.then(res => {
console.log(res);
const { totalConsumeAmount, totalConsumeCount } = res.data;
this.setData({
'comsumerData.count': totalConsumeAmount,
'countData.count': totalConsumeCount,
});
})
.catch(err => {
console.log(err);
});
},
fetchList(entity) {
return statisticsFetch({
url: '/boss/device/operation/data/detail/paging',
method: 'POST',
data: {
areaId: this.data.areaId,
timeType: this.data.timeType,
sortType: this.data.sortType,
deviceType: this.data.deviceType,
pageNum: this.data.pageNum,
pageSize: this.data.pageSize,
...entity,
},
});
},
refreshList() {
this.fetchList({
pageNum: 1,
})
.then(res => {
const { list } = res.data;
this.setData({
pageNum: 1,
dataList: list,
});
})
.catch(err => {
console.log(err);
});
},
getMoreListItem() {
this.fetchList({
pageNum: this.data.pageNum + 1,
})
.then(res => {
const { list } = res.data;
if (list && list.length) {
this.setData!({
dataList: [...this.data.dataList, ...list],
pageNum: this.data.pageNum + 1,
});
}
})
.catch(err => {
console.log(err);
});
},
changeSortType(e) {
const { value } = e.detail;
let item = this.data.sortTypeOptions[value];
console.log(item);
this.setData({
sortTypeIndex: value,
sortType: item.label,
});
this.refreshList();
},
changeDeviceType(e) {
console.log(e);
const { devicetype } = e.currentTarget.dataset;
if (devicetype === this.data.deviceType) return;
this.setData({
deviceType: devicetype,
});
this.refreshList();
},
},
});
<!-- pages/components/EquipmentOperationDetails/EquipmentOperationDetails.wxml -->
<view class="EquipmentOperationDetails">
<view class="EOperationDetails-filters">
<view class="EOperationDetails-filters-tiem">
<view class="EOperationDetails-filters-tiemItem {{timeType === 0?'checked':''}}" data-timetype="{{0}}" bind:tap="changeType">
本日
</view>
<view class="EOperationDetails-filters-tiemItem {{timeType === 1?'checked':''}}" data-timetype="{{1}}" bind:tap="changeType">
近七天
</view>
</view>
<view class="EOperationDetails-filters-type">
<c-select ex-class="EOperationDetails-filters-typeInput" mode="selector" value="{{sortTypeIndex}}" range="{{sortTypeOptions}}" rangeKey="label" bindchange="changeSortType" />
</view>
</view>
<view class="EOperationDetails-sumOrder">
<price-and-count tag-data="{{comsumerData}}" />
<price-and-count tag-data="{{countData}}" />
</view>
<view class="EOperationDetails-statebar">
<view wx:for="{{totalAmount}}" wx:key="key" class="EOperationDetails-statebarItem {{deviceType === item.type ? 'checked' : ''}}" data-devicetype="{{item.type}}" bind:tap="changeDeviceType">
<view class="EOperationDetails-statebarItem-name">{{item.key}}</view>
<view class="EOperationDetails-statebarItem-count">{{item.value}}台</view>
</view>
</view>
<view class="EOperationDetails-elist">
<scroll-view wx:if="{{dataList.length}}" class="EOperationDetails-list" scroll-y bindscrolltolower="getMoreListItem">
<view wx:for="{{dataList}}" class="EOperationDetails-elist-Item">
<view class="EOperationDetails-elist-ItemCode">{{item.deviceCode}}</view>
<view class="EOperationDetails-elist-ItemLocation">{{item.devicePos}}</view>
<view class="EOperationDetails-elist-ItemPrice">{{item.consumeAmount}}元</view>
</view>
</scroll-view>
<view wx:else style="padding:50rpx;text-align:center">暂无数据</view>
</view>
</view>
\ No newline at end of file
/* pages/components/EquipmentOperationDetails/EquipmentOperationDetails.wxss */
.EquipmentOperationDetails {
display: flex;
flex-direction: column;
height: 100%;
}
.EOperationDetails-filters {
display: flex;
padding: 40rpx 0;
justify-content: space-between;
}
.EOperationDetails-filters-tiem {
display: flex;
justify-content: space-around;
align-items: center;
width: 328rpx;
height: 80rpx;
background-color: #ededed;
border-radius: 20rpx;
}
.EOperationDetails-filters-tiemItem {
width: 136rpx;
height: 60rpx;
line-height: 60rpx;
text-align: center;
font-size: 28rpx;
color: #666;
}
.EOperationDetails-filters-tiemItem.checked {
border-radius: 20rpx;
background-color: #fff;
color: #6a92ff;
}
.EOperationDetails-filters-type {
width: 194rpx;
}
.EOperationDetails-filters-typeInput {
height: 80rpx;
line-height: 80rpx;
border-radius: 20rpx;
background-color: #ededed;
}
.EOperationDetails-filters-typeInput .select-icon {
right: 20rpx;
top: 10rpx;
}
.EOperationDetails-sumOrder {
display: flex;
padding-bottom: 40rpx;
}
.EOperationDetails-statebar {
display: flex;
}
.EOperationDetails-statebarItem {
align-items: center;
width: 168rpx;
height: 128rpx;
text-align: center;
font-size: 28rpx;
color: #666;
border: 1px solid #eee;
border-right-width: 0;
}
.EOperationDetails-statebarItem:last-child {
border-right-width: 1px;
}
.EOperationDetails-statebarItem.checked {
background-color: #7094f7;
color: #fff;
}
.EOperationDetails-statebarItem-name {
margin: 24rpx 0 10rpx;
}
.EOperationDetails-statebarItem-count {
width: 100%;
font-size: 24rpx;
}
.EOperationDetails-elist {
flex: 1;
overflow: hidden;
}
.EOperationDetails-elist-Item {
display: flex;
height: 100rpx;
line-height: 100rpx;
font-size: 28rpx;
color: #333;
border-bottom: 1px solid #f0f0f0;
}
.EOperationDetails-elist-ItemLocation {
margin-left: 20rpx;
flex: 1;
}
.EOperationDetails-list {
height: 100%;
}
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
import { deviceFetch } from '../../../api/fetch';
// pages/components/EquipmentState/EquipmentState.js
Component({
lifetimes: {
attached() {},
},
/**
* 组件的属性列表
*/
properties: {
areaId: {
type: Number,
value: 0,
observer(newVal) {
this.fetchAll();
},
},
},
/**
* 组件的初始数据
*/
data: {
status: 'enable',
tabs: [],
pagination: {
enable: {
pageNum: 1,
pageSize: 15,
},
forbidden: {
pageNum: 1,
pageSize: 15,
},
online: {
pageNum: 1,
pageSize: 15,
},
offline: {
pageNum: 1,
pageSize: 15,
},
},
dataList: {
enable: [],
forbidden: [],
online: [],
offline: [],
},
},
/**
* 组件的方法列表
*/
methods: {
fetchAll() {
this.fetchData();
this.refreshList();
},
fetchData() {
deviceFetch({
url: `/device/report/deviceStautsCount/${this.data.areaId}`,
})
.then(res => {
console.log(res);
const list = res.data.map(item => {
let label = '';
switch (item.status) {
case 'enable':
label = '启用设备';
break;
case 'forbidden':
label = '禁用设备';
break;
case 'online':
label = '在线设备';
break;
case 'offline':
label = '离线设备';
break;
default:
break;
}
return {
...item,
label,
};
});
this.setData({
tabs: list,
});
})
.catch(err => {
console.log(err);
});
},
fetchList(entity) {
return deviceFetch({
url: `/device/report/status/${this.data.status}`,
data: {
areaId: this.data.areaId,
pageNum: this.data.pagination[this.data.status].pageNum,
pageSize: this.data.pagination[this.data.status].pageSize,
...entity,
},
});
},
refreshList() {
wx.showLoading({
title: '加载中',
});
this.fetchList()
.then(res => {
wx.hideLoading();
console.log(res);
if (res.data && res.data.length) {
this.setData({
['dataList.' + this.data.status]: res.data,
});
}
})
.catch(err => {
wx.hideLoading();
console.log(err);
});
},
getMoreListItem() {
wx.showLoading({
title: '加载中',
});
let nextPage = this.data.pagination[this.data.status].pageNum + 1;
this.fetchList({
pageNum: nextPage,
})
.then(res => {
wx.hideLoading();
console.log(res);
if (res.data && res.data.length) {
this.setData({
['dataList.' + this.data.status]: [
...this.data.dataList[this.data.status],
...res.data,
],
['pagination.' + this.data.status + '.pageNum']: nextPage,
});
}
})
.catch(err => {
wx.hideLoading();
console.log(err);
});
},
changeTab(e) {
const { status } = e.currentTarget.dataset;
console.log(e, status);
this.setData({
status,
});
if (!this.data.dataList[status].length) this.refreshList();
},
openEquipment(e) {
const { code, type } = e.currentTarget.dataset;
console.log(code);
deviceFetch({
url: `/device/${code}/${type}/enable`,
method: 'POST',
})
.then(res => {
wx.showToast({
title: res.msg || '操作成功',
});
this.refreshList();
})
.catch(err => {
console.log(err);
});
},
closeEquipment(e) {
const { code, type } = e.currentTarget.dataset;
console.log(code);
deviceFetch({
url: `/device/${code}/${type}/forbidden`,
method: 'POST',
})
.then(res => {
wx.showToast({
title: res.msg || '操作成功',
});
this.refreshList();
})
.catch(err => {
console.log(err);
});
},
},
});
<!-- pages/components/EquipmentState/EquipmentState.wxml -->
<view class="EquipmentState">
<view class="EquipmentState-statebar">
<view wx:for="{{tabs}}" wx:key="status" class="EquipmentState-statebarItem {{status === item.status ? 'checked':''}}" data-status="{{item.status}}" bind:tap="changeTab">
<view class="EquipmentState-statebarItem-name">{{item.label}}</view>
<view class="EquipmentState-statebarItem-count">{{item.amount}}台</view>
</view>
</view>
<view class="EquipmentState-elist">
<scroll-view wx:if="{{dataList[status].length}}" class="EquipmentState-list" scroll-y bindscrolltolower="getMoreListItem">
<view wx:for="{{dataList[status]}}" wx:key="deviceCode" class="EquipmentState-elist-Item">
<view class="EquipmentState-elist-ItemCode">{{item.deviceCode}}</view>
<view class="EquipmentState-elist-ItemService">
{{item.deviceType === 2?'洗衣':item.deviceType === 3?'饮水':item.deviceType === 4?'吹风':item.deviceType === 5?'洗浴':item.deviceType}}
</view>
<view class="EquipmentState-elist-ItemLocation">{{item.position?item.position:'-'}}</view>
<view wx:if="{{status === 'forbidden'}}" class="EquipmentState-elist-ItemBtn Open" data-code="{{item.deviceCode}}" data-type="{{item.deviceType}}" bind:tap="openEquipment">
启用
</view>
<view wx:elif="{{status === 'enable'}}" class="EquipmentState-elist-ItemBtn Close" data-code="{{item.deviceCode}}" data-type="{{item.deviceType}}" bind:tap="closeEquipment">
禁用
</view>
</view>
</scroll-view>
<view wx:else style="padding:50rpx;text-align:center">暂无数据</view>
</view>
</view>
\ No newline at end of file
/* pages/components/EquipmentState/EquipmentState.wxss */
.EquipmentState {
height: 100%;
display: flex;
flex-direction: column;
overflow: hidden;
}
.EquipmentState-statebar {
display: flex;
margin: 40rpx 0 20rpx;
}
.EquipmentState-statebarItem {
align-items: center;
width: 168rpx;
height: 128rpx;
text-align: center;
font-size: 28rpx;
color: #666;
border: 1px solid #eee;
}
.EquipmentState-statebarItem.checked {
background-color: #7094f7;
color: #fff;
}
.EquipmentState-statebarItem-name {
margin: 24rpx 0 10rpx;
}
.EquipmentState-statebarItem-count {
width: 100%;
font-size: 24rpx;
}
.EquipmentState-elist {
flex: 1;
overflow: hidden;
}
.EquipmentState-list {
height: 100%;
}
.EquipmentState-elist-Item {
display: flex;
align-items: center;
height: 100rpx;
line-height: 100rpx;
font-size: 28rpx;
color: #333;
border-bottom: 1px solid #f0f0f0;
}
.EquipmentState-elist-ItemCode {
width: 150rpx;
}
.EquipmentState-elist-ItemService {
margin-left: 20rpx;
}
.EquipmentState-elist-ItemLocation {
margin-left: 20rpx;
flex: 1;
}
.EquipmentState-elist-ItemBtn {
width: 80rpx;
height: 60rpx;
line-height: 60rpx;
border-radius: 20rpx;
text-align: center;
font-size: 24rpx;
}
.EquipmentState-elist-ItemBtn.Open {
background-color: #e6f9ec;
color: #6edb8f;
}
.EquipmentState-elist-ItemBtn.Close {
background-color: #ffe5e5;
color: #fe6868;
}
{
"component": true,
"usingComponents": {
"c-select": "../components/Select/Select"
}
}
import { deviceFetch } from '../../../api/fetch';
// pages/components/EquipmentWarning/EquipmentWarning.js
Component({
lifetimes: {
attached() {
if (!this.data.warningTypeRange) {
this.fetchWarningLevelList();
}
},
},
/**
* 组件的属性列表
*/
properties: {
areaId: {
type: Number,
value: 0,
observer(newVal) {
this.refreshList();
},
},
},
/**
* 组件的初始数据
*/
data: {
warningLevelRange: [],
warnLevelIndex: '',
warnLevel: 0,
deviceLocation: '',
dataList: [],
pageNum: 1,
pageSize: 10,
},
/**
* 组件的方法列表
*/
methods: {
fetchWarningLevelList() {
deviceFetch({
url: '/device/warning/dict/illegalOperations',
data: {
warnLevel: 1,
},
})
.then(res => {
console.log(res);
this.setData({
warningLevelRange: res.data,
});
})
.catch(err => {
console.log(err);
});
},
changeWarningType(e) {
const index = e.detail.value;
if (index === this.data.warnLevelIndex) return;
const item = this.data.warningLevelRange[index];
console.log(item);
this.setData({
warnLevelIndex: index,
warnLevel: item.key,
});
this.refreshList();
},
changeLocation(e) {
const { value } = e.detail;
console.log(value);
this.setData({
deviceLocation: value,
});
this.refreshList();
},
fetchList(entity) {
if (this.data.warnLevel) {
entity.operation = this.data.warnLevel;
}
if (this.data.deviceLocation) {
entity.deviceLocation = this.data.deviceLocation;
}
return deviceFetch({
url: '/device/warning/paging',
method: 'POST',
data: {
warnLevel: 1,
operator: true,
areaId: this.data.areaId,
pageNum: this.data.pageNum,
pageSize: this.data.pageSize,
...entity,
},
});
},
refreshList() {
wx.showLoading({
title: '加载中',
});
this.fetchList({})
.then(res => {
wx.hideLoading();
console.log(res);
const { list } = res.data;
if (list && list.length) {
this.setData({
dataList: list,
});
}
})
.catch(err => {
wx.hideLoading();
console.log(err);
});
},
getMoreListItem() {
wx.showLoading({
title: '加载中',
});
let nextPage = this.data.pageNum + 1;
this.fetchList({
pageNum: nextPage,
})
.then(res => {
wx.hideLoading();
console.log(res);
const { list, pageNum } = res.data;
if (list && list.length) {
this.setData({
dataList: [...this.data.dataList, ...list],
pageNum,
});
}
})
.catch(err => {
wx.hideLoading();
console.log(err);
});
},
openEquipment(e) {
const { code, type } = e.currentTarget.dataset;
console.log(code);
deviceFetch({
url: `/device/${code}/${type}/enable`,
method: 'POST',
})
.then(res => {
wx.showToast({
title: res.msg || '操作成功',
});
this.refreshList();
})
.catch(err => {
console.log(err);
});
},
closeEquipment(e) {
const { code, type } = e.currentTarget.dataset;
console.log(code);
deviceFetch({
url: `/device/${code}/${type}/forbidden`,
method: 'POST',
})
.then(res => {
wx.showToast({
title: res.msg || '操作成功',
});
this.refreshList();
})
.catch(err => {
console.log(err);
});
},
},
});
<!-- pages/components/EquipmentWarning/EquipmentWarning.wxml -->
<view class="EquipmentWarning">
<view class="EquipmentWarning-filters">
<view class="EquipmentWarning-type">
<c-select ex-class="EquipmentWarning-filters-levelInput" mode="selector" value="{{warningLevel}}" range="{{warningLevelRange}}" rangeKey="value" bindchange="changeWarningType" />
</view>
<view class="EquipmentWarning-location">
<input class="EquipmentWarning-location-input" type="text" placeholder="设备位置" bindconfirm="changeLocation" />
</view>
</view>
<view class="EquipmentWarning-elist">
<scroll-view wx:if="{{dataList.length}}" class="EquipmentWarning-list" scroll-y bindscrolltolower="getMoreListItem">
<view wx:for="{{dataList}}" wx:key="id" class="EquipmentWarning-listItem">
<view class="EquipmentWarning-listItem-title">
<view class="EquipmentWarning-listItem-titleCode">{{item.deviceCode}}</view>
<view class="EquipmentWarning-listItem-titleLocation">{{item.deviceLocation}}</view>
<view wx:if="{{item.status === 1}}" class="EquipmentWarning-listItem-titleState Close" data-code="{{item.deviceCode}}" data-type="{{item.deviceType}}" bind:tap="closeEquipment">
禁用
</view>
<view wx:if="{{item.status === 0}}" class="EquipmentWarning-listItem-titleState Open" data-code="{{item.deviceCode}}" data-type="{{item.deviceType}}" bind:tap="openEquipment">
启用
</view>
</view>
<view class="EquipmentWarning-listItem-info">
<view class="EquipmentWarning-listItem-infoErr">{{item.operationName}}</view>
<view class="EquipmentWarning-listItem-infoTime">{{item.operTime}}</view>
</view>
</view>
</scroll-view>
<view wx:else style="padding:50rpx;text-align:center">暂无数据</view>
</view>
</view>
\ No newline at end of file
/* pages/components/EquipmentWarning/EquipmentWarning.wxss */
.EquipmentWarning {
height: 100%;
display: flex;
flex-direction: column;
overflow: hidden;
}
.EquipmentWarning-filters {
display: flex;
justify-content: space-between;
padding: 40rpx 0 60rpx;
}
.EquipmentWarning-type {
width: 246rpx;
height: 80rpx;
}
.EquipmentWarning-location {
width: 404rpx;
height: 80rpx;
}
.EquipmentWarning-location-input {
height: 80rpx;
line-height: 80rpx;
border-radius: 20rpx;
}
.EquipmentWarning-filters .EquipmentWarning-filters-levelInput {
height: 80rpx;
line-height: 80rpx;
border-radius: 20rpx;
background-color: #ededed;
}
.EquipmentWarning-elist {
padding: 20rpx 0;
flex: 1;
overflow: hidden;
}
.EquipmentWarning-list {
height: 100%;
}
.EquipmentWarning-listItem {
padding: 40rpx 0;
border-bottom: 1px solid #eee;
}
.EquipmentWarning-listItem:last-child {
border: 0;
}
.EquipmentWarning-listItem-title {
display: flex;
align-items: center;
font-size: 28rpx;
color: #666;
}
.EquipmentWarning-listItem-titleCode {
width: 150rpx;
}
.EquipmentWarning-listItem-titleLocation {
margin-left: 20rpx;
width: 300rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.EquipmentWarning-listItem-titleState {
text-align: center;
border-radius: 20rpx;
width: 80rpx;
height: 60rpx;
line-height: 60rpx;
margin-left: 120rpx;
}
.EquipmentWarning-listItem-titleState.Open {
background-color: #e6f9ec;
color: #6edb8f;
}
.EquipmentWarning-listItem-titleState.Close {
background-color: #ffe5e5;
color: #fe6868;
}
.EquipmentWarning-listItem-info {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 28rpx;
color: #333;
margin-top: 20rpx;
}
.EquipmentWarning-listItem-infoErr {
width: 410rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.EquipmentWarning-listItem-infoTime {
font-size: 24rpx;
color: #999;
}
...@@ -68,6 +68,11 @@ Component({ ...@@ -68,6 +68,11 @@ Component({
}); });
}); });
}, },
goDetailPage: function () {
wx.navigateTo({
url: "/pages/feedbackDetail/feedbackDetail?customerName=" + this.data.feedbackData.customerName + "&customerPhone=" + this.data.feedbackData.customerPhone + "&id=" + this.data.feedbackData.id,
});
},
}, },
}); });
//# sourceMapping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AgICAgY29uc29sZS5sb2coJ3N1Y2Nlc3MnKTtcbiAgICAgICAgfSxcbiAgICAgICAgZmFpbDogKCkgPT4ge1xuICAgICAgICAgIGNvbnNvbGUubG9nKCdmYWlsJyk7XG4gICAgICAgIH0sXG4gICAgICB9KTtcbiAgICB9LFxuICAgIGlucHV0SGFuZGxlKGUpIHtcbiAgICAgIGNvbnN0IHZhbCA9IGUuZGV0YWlsLnZhbHVlO1xuICAgICAgdGhpcy5zZXREYXRhKHtcbiAgICAgICAgaW5wdXRWYWx1ZTogdmFsLFxuICAgICAgfSk7XG4gICAgfSxcblxuICAgIHNlbmRGZWVkYmFjaygpIHtcbiAgICAgIGNvbnN0IHZhbCA9IHRoaXMuZGF0YS5pbnB1dFZhbHVlO1xuXG4gICAgICBjdXN0b21lckZldGNoKHtcbiAgICAgICAgdXJsOiAnL2ZlZWRiYWNrL2ZlZWRiYWNrJyxcbiAgICAgICAgbWV0aG9kOiAnUFVUJyxcbiAgICAgICAgZGF0YToge1xuICAgICAgICAgIGlkOiB0aGlzLmRhdGEuZmVlZGJhY2tEYXRhLmlkLFxuICAgICAgICAgIHJlcGxheUNvbnRlbnQ6IHZhbCxcbiAgICAgICAgICBzdGF0ZTogJzMnLFxuICAgICAgICB9LFxuICAgICAgfSlcbiAgICAgICAgLnRoZW4ocmVzID0+IHtcbiAgICAgICAgICB3eC5zaG93VG9hc3Qoe1xuICAgICAgICAgICAgdGl0bGU6IHJlcy5tc2csXG4gICAgICAgICAgfSk7XG4gICAgICAgICAgdGhpcy5zZXREYXRhKHtcbiAgICAgICAgICAgIGlucHV0VmFsdWU6ICcnLFxuICAgICAgICAgIH0pO1xuICAgICAgICAgIHRoaXMudHJpZ2dlckV2ZW50KCdyZWZyZXNoJywge30pO1xuICAgICAgICB9KVxuICAgICAgICAuY2F0Y2goKGVycjogd3guR2VuZXJhbENhbGxiYWNrUmVzdWx0KSA9PiB7XG4gICAgICAgICAgd3guc2hvd1RvYXN0KHtcbiAgICAgICAgIC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ICAgICAgICB9LFxuICAgICAgfSlcbiAgICAgICAgLnRoZW4ocmVzID0+IHtcbiAgICAgICAgICB3eC5zaG93VG9hc3Qoe1xuICAgICAgICAgICAgdGl0bGU6IHJlcy5tc2csXG4gICAgICAgICAgfSk7XG4gICAgICAgICAgdGhpcy5zZXREYXRhKHtcbiAgICAgICAgICAgIGlucHV0VmFsdWU6ICcnLFxuICAgICAgICAgIH0pO1xuICAgICAgICAgIHRoaXMudHJpZ2dlckV2ZW50KCdyZWZyZXNoJywge30pO1xuICAgICAgICB9KVxuICAgICAgICAuY2F0Y2goKGVycjogd3guR2VuZXJhbENhbGxiYWNrUmVzdWx0KSA9PiB7XG4gICAgICAgICAgd3guc2hvd1RvYXN0KHtcbiAgICAgICAgICAgIHRpdGxlOiBlcnIuZXJyTXNnLFxuICAgICAgICAgICAgaWNvbjogJ25vbmUnLFxuICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICB9LFxuICAgIGdvRGV0YWlsUGFnZSgpIHtcbiAgICAgIHd4Lm5hdmlnYXRlVG8oe1xuICAgICAgICB1cmw6IGAvcGFnZXMvZmVlZGJhY2tEZXRhaWwvZmVlZGJhY2tEZXRhaWw/Y3VzdG9tZXJOYW1lPSR7dGhpcy5kYXRhLmZlZWRiYWNrRGF0YS5jdXN0b21lck5hbWV9JmN1c3RvbWVyUGhvbmU9JHt0aGlzLmRhdGEuZmVlZGJhY2tEYXRhLmN1c3RvbWVyUGhvbmV9JmlkPSR7dGhpcy5kYXRhLmZlZWRiYWNrRGF0YS5pZH1gLFxuICAgICAgfSk7XG4gICAgfSxcbiAgfSxcbn0pO1xuIl19
\ No newline at end of file \ No newline at end of file
...@@ -80,5 +80,10 @@ Component({ ...@@ -80,5 +80,10 @@ Component({
}); });
}); });
}, },
goDetailPage() {
wx.navigateTo({
url: `/pages/feedbackDetail/feedbackDetail?customerName=${this.data.feedbackData.customerName}&customerPhone=${this.data.feedbackData.customerPhone}&id=${this.data.feedbackData.id}`,
});
},
}, },
}); });
...@@ -8,12 +8,12 @@ ...@@ -8,12 +8,12 @@
<view class="FeedbackItem-areaname">{{feedbackData.areaName}}</view> <view class="FeedbackItem-areaname">{{feedbackData.areaName}}</view>
</view> </view>
<view class="FeedbackItem-content">{{feedbackData.feedbackContent}}</view> <view class="FeedbackItem-content">{{feedbackData.feedbackContent}}</view>
<input class="FeedbackItem-input" bindinput="inputHandle" value="{{inputValue}}"></input> <!-- <input class="FeedbackItem-input" bindinput="inputHandle" value="{{inputValue}}"></input> -->
<view class="FeedbackItem-option"> <view class="FeedbackItem-option">
<view class="FeedbackItem-phone" bind:tap="makePhoneCallHandle"> <view class="FeedbackItem-phone" bind:tap="makePhoneCallHandle">
<image class="FeedbackItem-phoneIcon" src="../../../images/ic_phone@2x.png"></image> <image class="FeedbackItem-phoneIcon" src="../../../images/ic_phone@2x.png"></image>
{{feedbackData.customerPhone}} {{feedbackData.customerPhone}}
</view> </view>
<view class="FeedbackItem-send" bind:tap="sendFeedback">发送</view> <view class="FeedbackItem-send" bind:tap="goDetailPage">处理</view>
</view> </view>
</view> </view>
\ No newline at end of file
...@@ -16,6 +16,9 @@ Component({ ...@@ -16,6 +16,9 @@ Component({
if (numberType === 'price') { if (numberType === 'price') {
formatCount = util_1.formatPrice(count); formatCount = util_1.formatPrice(count);
} }
else {
formatCount = util_1.formatPrice(count).split('.')[0];
}
this.setData({ this.setData({
formatCount: formatCount, formatCount: formatCount,
}); });
...@@ -27,4 +30,4 @@ Component({ ...@@ -27,4 +30,4 @@ Component({
}, },
methods: {}, methods: {},
}); });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUHJpY2VBbmRDb3VudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIlByaWNlQW5kQ291bnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSw0Q0FBa0Q7QUFHbEQsU0FBUyxDQUFDO0lBSVIsVUFBVSxFQU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bnVtYmVyVHlwZSB9ID0gbmV3VmFsO1xuICAgICAgICBsZXQgZm9ybWF0Q291bnQgPSBjb3VudC50b1N0cmluZygpO1xuICAgICAgICBpZiAobnVtYmVyVHlwZSA9PT0gJ3ByaWNlJykge1xuICAgICAgICAgIGZvcm1hdENvdW50ID0gZm9ybWF0UHJpY2UoY291bnQpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGZvcm1hdENvdW50ID0gZm9ybWF0UHJpY2UoY291bnQpLnNwbGl0KCcuJylbMF07XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5zZXREYXRhKHtcbiAgICAgICAgICBmb3JtYXRDb3VudCxcbiAgICAgICAgfSk7XG4gICAgICB9LFxuICAgIH0sXG4gIH0sXG4gIC8qKlxuICAgKiDnu4Tku7bnmoTliJ3lp4vmlbDmja5cbiAgICovXG4gIGRhdGE6IHtcbiAgICBmb3JtYXRDb3VudDogJzAnLFxuICB9LFxuXG4gIC8qKlxuICAgKiDnu4Tku7bnmoTmlrnms5XliJfooahcbiAgICovXG4gIG1ldGhvZHM6IHt9LFxufSk7XG4iXX0=
\ No newline at end of file \ No newline at end of file
...@@ -18,6 +18,8 @@ Component({ ...@@ -18,6 +18,8 @@ Component({
let formatCount = count.toString(); let formatCount = count.toString();
if (numberType === 'price') { if (numberType === 'price') {
formatCount = formatPrice(count); formatCount = formatPrice(count);
} else {
formatCount = formatPrice(count).split('.')[0];
} }
this.setData({ this.setData({
formatCount, formatCount,
......
"use strict"; "use strict";
Component({ Component({
externalClasses: ['ex-class'],
properties: { properties: {
placeholder: { placeholder: {
type: String, type: String,
...@@ -44,4 +45,4 @@ Component({ ...@@ -44,4 +45,4 @@ Component({
}, },
}, },
}); });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU2VsZWN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiU2VsZWN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3M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3VmFsKTtcbiAgICAgICAgdGhpcy5zZXREYXRhKHsgc2VsZWN0ZWQ6IG5ld1ZhbCB9KTtcbiAgICAgIH0sXG4gICAgfSxcbiAgfSxcbiAgZGF0YToge1xuICAgIHNlbGVjdGVkOiAnJyxcbiAgfSxcbiAgbWV0aG9kczoge1xuICAgIGJpbmRQaWNrZXJDaGFuZ2UoZSkge1xuICAgICAgY29uc3QgeyB2YWx1ZSB9ID0gZS5kZXRhaWw7XG4gICAgICBjb25zb2xlLmxvZyh2YWx1ZSk7XG4gICAgICB0aGlzLnNldERhdGEhKHtcbiAgICAgICAgc2VsZWN0ZWQ6IHZhbHVlLFxuICAgICAgfSk7XG4gICAgICB0aGlzLnRyaWdnZXJFdmVudCgnY2hhbmdlJywgeyB2YWx1ZSB9KTtcbiAgICB9LFxuICB9LFxufSk7XG4iXX0=
\ No newline at end of file \ No newline at end of file
Component({ Component({
externalClasses: ['ex-class'],
properties: { properties: {
placeholder: { placeholder: {
type: String, type: String,
......
<!-- pages/components/Select/Select.wxml --> <!-- pages/components/Select/Select.wxml -->
<view class="select-input"> <view class="select-input ex-class">
<picker class="select-picker" mode="{{mode}}" bindchange="bindPickerChange" value="{{selected}}" range="{{range}}" range-key="{{rangeKey}}" fields="{{fields}}"> <picker class="select-picker" mode="{{mode}}" bindchange="bindPickerChange" value="{{selected}}" range="{{range}}" range-key="{{rangeKey}}" fields="{{fields}}">
<view wx:if="{{selected && mode === 'date'}}" class="select-value">{{selected}}</view> <view wx:if="{{selected && mode === 'date'}}" class="select-value">{{selected}}</view>
<view wx:elif="{{selected}}" class="select-value">{{range[selected][rangeKey]}}</view> <view wx:elif="{{selected}}" class="select-value">{{range[selected][rangeKey]}}</view>
......
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var fetch_1 = require("../../../api/fetch");
Component({
properties: {
itemData: { type: Object, value: {} },
},
data: {
inputValue: '',
},
methods: {
inputHandle: function (e) {
var val = e.detail.value;
this.setData({
inputValue: val,
});
},
sendFeedback: function (e) {
var _this = this;
var id = e.currentTarget.dataset.id;
var val = this.data.inputValue;
console.log(val, id);
fetch_1.customerFetch({
url: '/feedback/feedback',
method: 'PUT',
data: {
id: id,
replayContent: val,
state: '3',
},
})
.then(function (res) {
wx.showToast({
title: res.msg,
});
_this.setData({
inputValue: '',
});
_this.triggerEvent('refresh', {});
})
.catch(function (err) {
wx.showToast({
title: err.errMsg,
icon: 'none',
});
});
},
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmVlZGJhY2tEZXRhaWxJdGVtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZmVlZGJhY2tEZXRhaWxJdGVtLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsNENBQW1EO0FBR25ELFNBQVMsQ0FBQztJQUlSLFVBQVUsRUFBRTtRQUNWLFFBQVEsRUFBRSxFQUFFLElBQUksRUFBRSxNQUFNLEVBQUUsS0FBSyxFQUFFLEVBQUUsRUFBRTtLQUN0QztJQUtELElBQUksRUFBRTtRQUNKLFVBQVUsRUFBRSxFQUFFO0tBQ2Y7SUFLRCxPQUFPLEVBQUU7UUFDUCxXQUFXLFlBQUMsQ0FBQztZQUNYLElBQU0sR0FBRyxHQUFHLENBQUMsQ0FBQyxNQUFNLENBQUMsS0FBSyxDQUFDO1lBQzNCLElBQUksQ0FBQyxPQUFRLENBQUM7Z0JBQ1osVUFBVSxFQUFFLEdBQUc7YUFDaEIsQ0FBQyxDQUFDO1FBQ0wsQ0FBQztRQUVELFlBQVksWUFBQyxDQUFDO1lBQWQsaUJBNkJDO1lBNUJTLElBQUEsK0JBQUUsQ0FBNkI7WUFDdkMsSUFBTSxHQUFHLEdBQUcsSUFBSSxDQUFDLElBQUksQ0FBQyxVQUFVLENBQUM7WUFDakMsT0FBTyxDQUFDLEdBQUcsQ0FBQyxHQUFHLEVBQUUsRUFBRSxDQUFDLENBQUM7WUFFckIscUJBQWEs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dCwgdmFsdWU6IHt9IH0sXG4gIH0sXG5cbiAgLyoqXG4gICAqIOe7hOS7tueahOWIneWni+aVsOaNrlxuICAgKi9cbiAgZGF0YToge1xuICAgIGlucHV0VmFsdWU6ICcnLFxuICB9LFxuXG4gIC8qKlxuICAgKiDnu4Tku7bnmoTmlrnms5XliJfooahcbiAgICovXG4gIG1ldGhvZHM6IHtcbiAgICBpbnB1dEhhbmRsZShlKSB7XG4gICAgICBjb25zdCB2YWwgPSBlLmRldGFpbC52YWx1ZTtcbiAgICAgIHRoaXMuc2V0RGF0YSEoe1xuICAgICAgICBpbnB1dFZhbHVlOiB2YWwsXG4gICAgICB9KTtcbiAgICB9LFxuXG4gICAgc2VuZEZlZWRiYWNrKGUpIHtcbiAgICAgIGNvbnN0IHsgaWQgfSA9IGUuY3VycmVudFRhcmdldC5kYXRhc2V0O1xuICAgICAgY29uc3QgdmFsID0gdGhpcy5kYXRhLmlucHV0VmFsdWU7XG4gICAgICBjb25zb2xlLmxvZyh2YWwsIGlkKTtcblxuICAgICAgY3VzdG9tZXJGZXRjaCh7XG4gICAgICAgIHVybDogJy9mZWVkYmFjay9mZWVkYmFjaycsXG4gICAgICAgIG1ldGhvZDogJ1BVVCcsXG4gICAgICAgIGRhdGE6IHtcbiAgICAgICAgICBpZDogaWQsXG4gICAgICAgICAgcmVwbGF5Q29udGVudDogdmFsLFxuICAgICAgICAgIHN0YXRlOiAnMycsXG4gICAgICAgIH0sXG4gICAgICB9KVxuICAgICAgICAudGhlbihyZXMgPT4ge1xuICAgICAgICAgIHd4LnNob3dUb2FzdCh7XG4gICAgICAgICAgICB0aXRsZTogcmVzLm1zZyxcbiAgICAgICAgICB9KTtcbiAgICAgICAgICB0aGlzLnNldERhdGEhKHtcbiAgICAgICAgICAgIGlucHV0VmFsdWU6ICcnLFxuICAgICAgICAgIH0pO1xuICAgICAgICAgIHRoaXMudHJpZ2dlckV2ZW50KCdyZWZyZXNoJywge30pO1xuICAgICAgICB9KVxuICAgICAgICAuY2F0Y2goKGVycjogd3guR2VuZXJhbENhbGxiYWNrUmVzdWx0KSA9PiB7XG4gICAgICAgICAgd3guc2hvd1RvYXN0KHtcbiAgICAgICAgICAgIHRpdGxlOiBlcnIuZXJyTXNnLFxuICAgICAgICAgICAgaWNvbjogJ25vbmUnLFxuICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICB9LFxuICB9LFxufSk7XG4iXX0=
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
import { customerFetch } from "../../../api/fetch";
// pages/components/feedbackDetailItem/feedbackDetailItem.js
Component({
/**
* 组件的属性列表
*/
properties: {
itemData: { type: Object, value: {} },
},
/**
* 组件的初始数据
*/
data: {
inputValue: '',
},
/**
* 组件的方法列表
*/
methods: {
inputHandle(e) {
const val = e.detail.value;
this.setData!({
inputValue: val,
});
},
sendFeedback(e) {
const { id } = e.currentTarget.dataset;
const val = this.data.inputValue;
console.log(val, id);
customerFetch({
url: '/feedback/feedback',
method: 'PUT',
data: {
id: id,
replayContent: val,
state: '3',
},
})
.then(res => {
wx.showToast({
title: res.msg,
});
this.setData!({
inputValue: '',
});
this.triggerEvent('refresh', {});
})
.catch((err: wx.GeneralCallbackResult) => {
wx.showToast({
title: err.errMsg,
icon: 'none',
});
});
},
},
});
<!-- pages/components/feedbackDetailItem/feedbackDetailItem.wxml -->
<view class="feedbackDetail-item">
<view class="feedbackDetail-itemTitle">{{itemData.feedbackContent}}</view>
<view class="feedbackDetail-itemTime">{{itemData.createAt}}</view>
<view class="feedbackDetail-itemBox">
<input class="feedbackDetail-itemInput" type="text" value="{{inputValue}}" bindinput="inputHandle" />
<button class="feedbackDetail-itemBtn" bind:tap="sendFeedback" data-id="{{itemData.id}}">发送</button>
</view>
</view>
\ No newline at end of file
/* pages/components/feedbackDetailItem/feedbackDetailItem.wxss */
.feedbackDetail-item {
border-bottom: 8rpx solid #efefef;
padding: 40rpx;
}
.feedbackDetail-itemTitle {
font-size: 32rpx;
color: #333;
margin-bottom: 24rpx;
}
.feedbackDetail-itemTime {
font-size: 24rpx;
color: #999;
margin-bottom: 20rpx;
}
.feedbackDetail-itemBox {
display: flex;
}
.feedbackDetail-itemInput {
width: 456rpx;
height: 76rpx;
border-radius: 20rpx;
background-color: #f0f3fd;
}
.feedbackDetail-itemBtn {
font-size: 32rpx;
border-radius: 20rpx;
margin-left: 10rpx;
background-color: #6a92ff;
color: #fff;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var fetch_1 = require("../../api/fetch");
Page({
data: {
colors: ['#6895fe', '#fe6868', '#6ee18f', '#feae68'],
areaDeviceAmount: [],
statusAmount: [],
totalAmount: [],
total: 0,
},
onLoad: function () {
console.log('in onLoad');
this.fetchList();
},
fetchList: function () {
var _this = this;
wx.showLoading({
title: '加载中',
});
fetch_1.deviceFetch({
url: '/device/report/mainPage',
})
.then(function (res) {
wx.hideLoading();
console.log(res);
var _a = res.data, areaDeviceAmount = _a.areaDeviceAmount, statusAmount = _a.statusAmount, totalAmount = _a.totalAmount;
var total = totalAmount.reduce(function (count, item) { return count + item.value; }, 0);
_this.setData({
areaDeviceAmount: areaDeviceAmount,
statusAmount: statusAmount,
totalAmount: totalAmount,
total: total,
});
})
.catch(function (err) {
console.log(err);
wx.hideLoading();
wx.showToast({
title: err.msg || err.errMsg || '网络错误',
icon: 'none',
duration: 4000,
});
});
},
goReportPage: function (e) {
var index = e.currentTarget.dataset.index;
var item = this.data.areaDeviceAmount[index];
wx.navigateTo({
url: "/pages/equipmentReport/equipmentReport?areaId=" + item.areaId + "&areaName=" + item.areaName,
success: function (res) {
res.eventChannel.emit('acceptDataFromOpenerPage', { data: item });
},
});
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXF1aXBtZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZXF1aXBtZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEseUNBQ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oe1xuICAvKipcbiAgICog6aG16Z2i55qE5Yid5aeL5pWw5o2uXG4gICAqL1xuICBkYXRhOiB7XG4gICAgY29sb3JzOiBbJyM2ODk1ZmUnLCAnI2ZlNjg2OCcsICcjNmVlMThmJywgJyNmZWFlNjgnXSxcbiAgICBhcmVhRGV2aWNlQW1vdW50OiBbXSxcbiAgICBzdGF0dXNBbW91bnQ6IFtdLFxuICAgIHRvdGFsQW1vdW50OiBbXSxcbiAgICB0b3RhbDogMCxcbiAgfSxcblxuICAvKipcbiAgICog55Sf5ZG95ZGo5pyf5Ye95pWwLS3nm5HlkKzpobXpnaLliqDovb1cbiAgICovXG4gIG9uTG9hZCgpIHtcbiAgICBjb25zb2xlLmxvZygnaW4gb25Mb2FkJyk7XG4gICAgdGhpcy5mZXRjaExpc3QoKTtcbiAgfSxcblxuICBmZXRjaExpc3QoKSB7XG4gICAgd3guc2hvd0xvYWRpbmcoe1xuICAgICAgdGl0bGU6ICfliqDovb3kuK0nLFxuICAgIH0pO1xuICAgIGRldmljZUZldGNoKHtcbiAgICAgIHVybDogJy9kZXZpY2UvcmVwb3J0L21haW5QYWdlJyxcbiAgICB9KVxuICAgICAgLnRoZW4ocmVzID0+IHtcbiAgICAgICAgd3guaGlkZUxvYWRpbmcoKTtcbiAgICAgICAgY29uc29sZS5sb2cocmVzKTtcbiAgICAgICAgY29uc3QgeyBhcmVhRGV2aWNlQW1vdW50LCBzdGF0dXNBbW91bnQsIHRvdGFsQW1vdW50IH0gPSByZXMuZGF0YTtcbiAgICAgICAgbGV0IHRvdGFsID0gdG90YWxBbW91bnQucmVkdWNlKFxuICAgICAgICAgIChjb3VudDogTnVtYmVyLCBpdGVtKSA9PiBjb3VudCArIGl0ZW0udmFsdWUsXG4gICAgICAgICAgMCxcbiAgICAgICAgKTtcbiAgICAgICAgdGhpcy5zZXREYXRhISh7XG4gICAgICAgICAgYXJlYURldmljZUFtb3VudCxcbiAgICAgICAgICBzdGF0dXNBbW91bnQsXG4gICAgICAgICAgdG90YWxBbW91bnQsXG4gICAgICAgICAgdG90YWwsXG4gICAgICAgIH0pO1xuICAgICAgfSlcbiAgICAgIC5jYXRjaChlcnIgPT4ge1xuICAgICAgICBjb25zb2xlLmxvZyhlcnIpO1xuICAgICAgICB3eC5oaWRlTG9hZGluZygpO1xuICAgICAgICB3eC5zaG93VG9hc3Qoe1xuICAgICAgICAgIHRpdGxlOiBlcnIubXNnIHx8IGVyci5lcnJNc2cgfHwgJ+e9kee7nOmUmeivrycsXG4gICAgICAgICAgaWNvbjogJ25vbmUnLFxuICAgICAgICAgIGR1cmF0aW9uOiA0MDAwLFxuICAgICAgICB9KTtcbiAgICAgIH0pO1xuICB9LFxuICBnb1JlcG9ydFBhZ2UoZSkge1xuICAgIGNvbnN0IHsgaW5kZXggfSA9IGUuY3VycmVudFRhcmdldC5kYXRhc2V0O1xuICAgIGNvbnN0IGl0ZW0gPSB0aGlzLmRhdGEuYXJlYURldmljZUFtb3VudFtpbmRleF07XG4gICAgd3gubmF2aWdhdGVUbyh7XG4gICAgICB1cmw6IGAvcGFnZXMvZXF1aXBtZW50UmVwb3J0L2VxdWlwbWVudFJlcG9ydD9hcmVhSWQ9JHtpdGVtLmFyZWFJZH0mYXJlYU5hbWU9JHtpdGVtLmFyZWFOYW1lfWAsXG4gICAgICBzdWNjZXNzOiBmdW5jdGlvbihyZXMpIHtcbiAgICAgICAgLy8g6YCa6L+HZXZlbnRDaGFubmVs5ZCR6KKr5omT5byA6aG16Z2i5Lyg6YCB5pWw5o2uXG4gICAgICAgIHJlcy5ldmVudENoYW5uZWwuZW1pdCgnYWNjZXB0RGF0YUZyb21PcGVuZXJQYWdlJywgeyBkYXRhOiBpdGVtIH0pO1xuICAgICAgfSxcbiAgICB9KTtcbiAgfSxcbn0pO1xuIl19
\ No newline at end of file
{
"navigationBarTitleText": "设备运营分析",
"usingComponents": {
"equipment-chart": "../components/EquipmentChart/EquipmentChart"
}
}
\ No newline at end of file
import { deviceFetch } from '../../api/fetch';
// miniprogram/pages/equipment/equipment.js
Page({
/**
* 页面的初始数据
*/
data: {
colors: ['#6895fe', '#fe6868', '#6ee18f', '#feae68'],
areaDeviceAmount: [],
statusAmount: [],
totalAmount: [],
total: 0,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad() {
console.log('in onLoad');
this.fetchList();
},
fetchList() {
wx.showLoading({
title: '加载中',
});
deviceFetch({
url: '/device/report/mainPage',
})
.then(res => {
wx.hideLoading();
console.log(res);
const { areaDeviceAmount, statusAmount, totalAmount } = res.data;
let total = totalAmount.reduce(
(count: Number, item) => count + item.value,
0,
);
this.setData!({
areaDeviceAmount,
statusAmount,
totalAmount,
total,
});
})
.catch(err => {
console.log(err);
wx.hideLoading();
wx.showToast({
title: err.msg || err.errMsg || '网络错误',
icon: 'none',
duration: 4000,
});
});
},
goReportPage(e) {
const { index } = e.currentTarget.dataset;
const item = this.data.areaDeviceAmount[index];
wx.navigateTo({
url: `/pages/equipmentReport/equipmentReport?areaId=${item.areaId}&areaName=${item.areaName}`,
success: function(res) {
// 通过eventChannel向被打开页面传送数据
res.eventChannel.emit('acceptDataFromOpenerPage', { data: item });
},
});
},
});
<!-- miniprogram/pages/equipment/equipment.wxml -->
<view class="equipment">
<view class="equipment-block">
<view class="equipment-title">
<view class="equipment-title-color"></view>
<view class="equipment-title-text">设备总数({{total}}台)</view>
</view>
<view class="equipment-canvas autoheight">
<equipment-chart dataList="{{totalAmount}}" />
</view>
</view>
<view class="equipment-block">
<view class="equipment-title">
<view class="equipment-title-color"></view>
<view class="equipment-title-text">设备状态</view>
</view>
<view class="equipment-canvas autoheight">
<equipment-chart dataList="{{statusAmount}}" colors="{{colors}}" />
</view>
</view>
<view class="equipment-area">
<view wx:for="{{areaDeviceAmount}}" wx:key="areaId" class="equipment-areaitem">
<view class="equipment-areaitem-title">
<view>{{item.areaName}}</view>
<view class="equipment-areaitem-titleLink" data-index="{{index}}" bind:tap="goReportPage">
运营数据 >
</view>
</view>
<view class="equipment-areaitem-count">
<view wx:for="{{item.totalAmount}}" wx:key="key" class="equipment-areaitem-countItem">
{{item.key}}设备数:{{item.value}}
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
/* miniprogram/pages/equipment/equipment.wxss */
.equipment-block {
padding: 0 40rpx;
/* border-bottom: 8rpx solid #eef3fc; */
}
.equipment-title {
display: flex;
align-items: center;
padding: 50rpx 0 20rpx;
}
.equipment-title-color {
width: 12rpx;
height: 12rpx;
margin-right: 12rpx;
border-radius: 50%;
background-color: #6895fe;
}
.equipment-area {
padding: 40rpx 24rpx;
background-color: #f8f8f8;
}
.equipment-areaitem {
margin-bottom: 20rpx;
border-radius: 20rpx;
padding: 40rpx 32rpx 20rpx;
background-color: #fff;
border: 1rpx solid #eee;
}
.equipment-areaitem-title {
display: flex;
justify-content: space-between;
font-size: 32rpx;
color: #666;
margin-bottom: 40rpx;
}
.equipment-areaitem-titleLink {
font-size: 28rpx;
color: #6a92ff;
}
.equipment-areaitem-count {
display: flex;
flex-wrap: wrap;
font-size: 28rpx;
color: #333;
}
.equipment-areaitem-countItem {
width: 50%;
margin-bottom: 20rpx;
}
"use strict";
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var fetch_1 = require("../../api/fetch");
Page({
data: {
areaId: null,
areaName: '',
type: 0,
timeType: 0,
totalAmount: [],
},
onLoad: function (options) {
var _this = this;
console.log(options);
var areaId = options.areaId, areaName = options.areaName;
var eventChannel = this.getOpenerEventChannel();
eventChannel.on('acceptDataFromOpenerPage', function (res) {
console.log(res);
_this.setData({
totalAmount: res.data.totalAmount.map(function (item) { return (__assign({}, item, { type: item.key === '洗衣'
? 2
: item.key === '饮水'
? 3
: item.key === '吹风'
? 4
: item.key === '洗浴'
? 5
: item.key })); }),
});
});
this.setData({
areaId: areaId,
areaName: areaName,
});
},
fetchWarningLevel: function () {
fetch_1.deviceFetch({
url: '/device/warning/dict/warningLevel',
})
.then(function (res) {
console.log(res);
})
.catch(function (err) {
console.log(err);
});
},
changeType: function (e) {
var type = e.currentTarget.dataset.type;
console.log(type);
if (type === this.data.type)
return;
this.setData({
type: type,
});
return false;
},
changeTimeType: function (e) {
var timeType = e.currentTarget.dataset.timeType;
console.log(timeType);
if (timeType === this.data.timeType)
return;
this.setData({
timeType: timeType,
});
return false;
},
fetchData: function () {
fetch_1.statisticsFetch({
url: '/boss/device/operation/data/summary',
method: 'POST',
data: {
areaId: this.data.areaId,
timeType: this.data.timeType,
},
})
.then(function (res) {
console.log(res);
})
.catch(function (err) {
console.log(err);
});
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXF1aXBtZW50UmVwb3J0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZXF1aXBtZW50UmVwb3J0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQSx5Q0FBK0Q7QUFHL0QsSUFBSSxDQUFDO0lBSUgsSUFBSSxFQUFFO1FBQ0osTUFBTSxFQUFFLElBQUk7UUFDWixRQUFRLEVBQUUsRUFBRTtRQUNaLElBQUksRUFBRSxDQUFDO1FBQ1AsUUFBUSxFQUFFLENBQUM7UUFDWCxXQUFXLEVBQUUsRUFBRTtLQUNoQjtJQUtELE1BQU0sRUFBRSxVQUFTLE9BQU87UUFBaEIsaUJBMkJQO1FBMUJDLE9BQU8sQ0FBQyxHQUFHLENBQUMsT0FBTyxDQUFDLENBQUM7UUFDYixJQUFBLHVCQUFNLEVBQUUsMkJBQVEsQ0FBYTtRQUNyQyxJQUFNLFlBQVksR0FBRyxJQUFJLENBQUMscUJBQXFCLEVBQUUsQ0FBQztRQUNsRCxZQUFZLENBQUMsRUFBRSxDQUFDLDBCQUEwQixFQUFFLFVBQUEsR0FBRztZQUM3Qyx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AgICAuLi5pdGVtLFxuICAgICAgICAgIHR5cGU6XG4gICAgICAgICAgICBpdGVtLmtleSA9PT0gJ+a0l+ihoydcbiAgICAgICAgICAgICAgPyAyXG4gICAgICAgICAgICAgIDogaXRlbS5rZXkgPT09ICfppa7msLQnXG4gICAgICAgICAgICAgID8gM1xuICAgICAgICAgICAgICA6IGl0ZW0ua2V5ID09PSAn5ZC56aOOJ1xuICAgICAgICAgICAgICA/IDRcbiAgICAgICAgICAgICAgOiBpdGVtLmtleSA9PT0gJ+a0l+a1tCdcbiAgICAgICAgICAgICAgPyA1XG4gICAgICAgICAgICAgIDogaXRlbS5rZXksXG4gICAgICAgIH0pKSxcbiAgICAgIH0pO1xuICAgIH0pO1xuICAgIHRoaXMuc2V0RGF0YSEoe1xuICAgICAgYXJlYUlkLFxuICAgICAgYXJlYU5hbWUsXG4gICAgfSk7XG4gICAgLy8gdGhpcy5mZXRjaFdhcm5pbmdMZXZlbCgpO1xuICB9LFxuICBmZXRjaFdhcm5pbmdMZXZlbCgpIHtcbiAgICBkZXZpY2VGZXRjaCh7XG4gICAgICB1cmw6ICcvZGV2aWNlL3dhcm5pbmcvZGljdC93YXJuaW5nTGV2ZWwnLFxuICAgIH0pXG4gICAgICAudGhlbihyZXMgPT4ge1xuICAgICAgICBjb25zb2xlLmxvZyhyZXMpO1xuICAgICAgfSlcbiAgICAgIC5jYXRjaChlcnIgPT4ge1xuICAgICAgICBjb25zb2xlLmxvZyhlcnIpO1xuICAgICAgfSk7XG4gIH0sXG4gIGNoYW5nZVR5cGUoZSkge1xuICAgIGNvbnN0IHsgdHlwZSB9ID0gZS5jdXJyZW50VGFyZ2V0LmRhdGFzZXQ7XG4gICAgY29uc29sZS5sb2codHlwZSk7XG4gICAgaWYgKHR5cGUgPT09IHRoaXMuZGF0YS50eXBlKSByZXR1cm47XG4gICAgdGhpcy5zZXREYXRhISh7XG4gICAgICB0eXBlOiB0eXBlLFxuICAgIH0pO1xuICAgIHJldHVybiBmYWxzZTtcbiAgfSxcbiAgY2hhbmdlVGltZVR5cGUoZSkge1xuICAgIGNvbnN0IHsgdGltZVR5cGUgfSA9IGUuY3VycmVudFRhcmdldC5kYXRhc2V0O1xuICAgIGNvbnNvbGUubG9nKHRpbWVUeXBlKTtcbiAgICBpZiAodGltZVR5cGUgPT09IHRoaXMuZGF0YS50aW1lVHlwZSkgcmV0dXJuO1xuICAgIHRoaXMuc2V0RGF0YSEoe1xuICAgICAgdGltZVR5cGUsXG4gICAgfSk7XG4gICAgcmV0dXJuIGZhbHNlO1xuICB9LFxuICBmZXRjaERhdGEoKSB7XG4gICAgc3RhdGlzdGljc0ZldGNoKHtcbiAgICAgIHVybDogJy9ib3NzL2RldmljZS9vcGVyYXRpb24vZGF0YS9zdW1tYXJ5JyxcbiAgICAgIG1ldGhvZDogJ1BPU1QnLFxuICAgICAgZGF0YToge1xuICAgICAgICBhcmVhSWQ6IHRoaXMuZGF0YS5hcmVhSWQsXG4gICAgICAgIHRpbWVUeXBlOiB0aGlzLmRhdGEudGltZVR5cGUsXG4gICAgICB9LFxuICAgIH0pXG4gICAgICAudGhlbihyZXMgPT4ge1xuICAgICAgICBjb25zb2xlLmxvZyhyZXMpO1xuICAgICAgfSlcbiAgICAgIC5jYXRjaChlcnIgPT4ge1xuICAgICAgICBjb25zb2xlLmxvZyhlcnIpO1xuICAgICAgfSk7XG4gIH0sXG59KTtcbiJdfQ==
\ No newline at end of file
{
"navigationBarTitleText": "运营数据",
"usingComponents": {
"equipment-operation-details": "../components/EquipmentOperationDetails/EquipmentOperationDetails",
"equipment-state": "../components/EquipmentState/EquipmentState",
"equipment-warning": "../components/EquipmentWarning/EquipmentWarning"
}
}
import { deviceFetch, statisticsFetch } from '../../api/fetch';
// miniprogram/pages/equipmentReport/equipmentReport.js
Page({
/**
* 页面的初始数据
*/
data: {
areaId: null,
areaName: '',
type: 0,
timeType: 0,
totalAmount: [],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
console.log(options);
const { areaId, areaName } = options;
const eventChannel = this.getOpenerEventChannel();
eventChannel.on('acceptDataFromOpenerPage', res => {
console.log(res);
this.setData!({
totalAmount: res.data.totalAmount.map(item => ({
...item,
type:
item.key === '洗衣'
? 2
: item.key === '饮水'
? 3
: item.key === '吹风'
? 4
: item.key === '洗浴'
? 5
: item.key,
})),
});
});
this.setData!({
areaId,
areaName,
});
// this.fetchWarningLevel();
},
fetchWarningLevel() {
deviceFetch({
url: '/device/warning/dict/warningLevel',
})
.then(res => {
console.log(res);
})
.catch(err => {
console.log(err);
});
},
changeType(e) {
const { type } = e.currentTarget.dataset;
console.log(type);
if (type === this.data.type) return;
this.setData!({
type: type,
});
return false;
},
changeTimeType(e) {
const { timeType } = e.currentTarget.dataset;
console.log(timeType);
if (timeType === this.data.timeType) return;
this.setData!({
timeType,
});
return false;
},
fetchData() {
statisticsFetch({
url: '/boss/device/operation/data/summary',
method: 'POST',
data: {
areaId: this.data.areaId,
timeType: this.data.timeType,
},
})
.then(res => {
console.log(res);
})
.catch(err => {
console.log(err);
});
},
});
<!-- miniprogram/pages/equipmentReport/equipmentReport.wxml -->
<view class="equipmentReport">
<view class="equipmentReport-title">{{areaName}}</view>
<view class="home-title-type">
<view class="title-type-item" data-type="{{0}}" bindtap="changeType">
<view class="radio-box {{type === 0?'checked':''}}"></view>
运营明细
</view>
<view class="title-type-item" data-type="{{1}}" bindtap="changeType">
<view class="radio-box {{type === 1?'checked':''}}"></view>
设备状态
</view>
<view class="title-type-item" data-type="{{2}}" bindtap="changeType">
<view class="radio-box {{type === 2?'checked':''}}"></view>
设备告警
</view>
</view>
<view class="equipmentReport-content">
<equipment-operation-details wx:if="{{type === 0}}" timeType="{{timeType}}" totalAmount="{{totalAmount}}" areaId="{{areaId}}" />
<equipment-state wx:if="{{type === 1}}" areaId="{{areaId}}" />
<equipment-warning wx:if="{{type === 2}}" areaId="{{areaId}}" />
</view>
</view>
\ No newline at end of file
/* miniprogram/pages/equipmentReport/equipmentReport.wxss */
page {
height: 100%;
}
.equipmentReport {
display: flex;
flex-direction: column;
height: 100%;
padding: 0 40rpx;
}
.equipmentReport-title {
padding: 40rpx 0;
font-size: 40rpx;
color: #333;
}
.home-title-type,
.title-type-item {
display: flex;
align-items: center;
}
.title-type-item {
font-size: 28rpx;
margin-right: 20rpx;
}
.radio-box {
box-sizing: border-box;
width: 32rpx;
height: 32rpx;
border-radius: 50%;
border: 2px solid #9c9c9c;
margin-right: 8rpx;
}
.radio-box.checked {
border-color: #6895fe;
background-color: #6895fe;
}
.equipmentReport-content {
flex: 1;
overflow: hidden;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var fetch_1 = require("../../api/fetch");
Page({
data: {
customerName: '',
customerPhone: '',
id: '',
dataList: [],
},
onLoad: function (options) {
var customerName = options.customerName, customerPhone = options.customerPhone, id = options.id;
wx.setNavigationBarTitle({
title: customerName + "-" + customerPhone,
});
this.setData({
customerName: customerName,
customerPhone: customerPhone,
id: id,
});
this.fetchList();
},
fetchList: function () {
var _this = this;
wx.showLoading({
title: '加载中',
});
return fetch_1.customerFetch({
url: "/feedback/get/feedback/" + this.data.id,
})
.then(function (res) {
wx.hideLoading();
var list = res.data.list;
_this.setData({
dataList: list,
});
})
.catch(function (err) {
wx.hideLoading();
console.log(err);
});
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmVlZGJhY2tEZXRhaWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJmZWVkYmFja0RldGFpbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHlDQUFnRDtBQUdoRCxJQUFJLENBQUM7SUFJSCxJQUFJLEVBQUU7UUFDSixZQUFZLEVBQUUsRUFBRTtRQUNoQixhQUFhLEVBQUUsRUFBRTtRQUNqQixFQUFFLEVBQUUsRUFBRTtRQUNOLFFBQVEsRUFBRSxFQUFFO0tBQ2I7SUFLRCxNQUFNLEVBQUUsVUFBUyxPQUFPO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Hd4LmhpZGVMb2FkaW5nKCk7XG4gIC8vICAgICAgIGNvbnNvbGUubG9nKHJlcyk7XG4gIC8vICAgICAgIGlmIChyZXMuZGF0YS5wYWdlICYmIHJlcy5kYXRhLnBhZ2UubGVuZ3RoKSB7XG4gIC8vICAgICAgICAgY29uc3Qge1xuICAvLyAgICAgICAgICAgcGFnZTogeyBsaXN0LCBwYWdlTnVtIH0sXG4gIC8vICAgICAgICAgfSA9IHJlcy5kYXRhO1xuICAvLyAgICAgICAgIHRoaXMuc2V0RGF0YSEoe1xuICAvLyAgICAgICAgICAgZGF0YUxpc3Q6IFsuLi50aGlzLmRhdGEuZGF0YUxpc3QsIC4uLmxpc3RdLFxuICAvLyAgICAgICAgICAgcGFnZU51bSxcbiAgLy8gICAgICAgICB9KTtcbiAgLy8gICAgICAgfVxuICAvLyAgICAgfSlcbiAgLy8gICAgIC5jYXRjaChlcnIgPT4ge1xuICAvLyAgICAgICB3eC5oaWRlTG9hZGluZygpO1xuICAvLyAgICAgICBjb25zb2xlLmxvZyhlcnIpO1xuICAvLyAgICAgfSk7XG4gIC8vIH0sXG59KTtcbiJdfQ==
\ No newline at end of file
{
"usingComponents": {
"feedback-detail-item": "../components/feedbackDetailItem/feedbackDetailItem"
}
}
import { customerFetch } from '../../api/fetch';
// miniprogram/pages/feedbackDetail/feedbackDetail.js
Page({
/**
* 页面的初始数据
*/
data: {
customerName: '',
customerPhone: '',
id: '',
dataList: [],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
const { customerName, customerPhone, id } = options;
wx.setNavigationBarTitle({
title: `${customerName}-${customerPhone}`,
});
this.setData!({
customerName,
customerPhone,
id,
});
this.fetchList();
},
fetchList() {
wx.showLoading({
title: '加载中',
});
return customerFetch({
url: `/feedback/get/feedback/${this.data.id}`,
})
.then(res => {
wx.hideLoading();
const { list } = res.data;
this.setData!({
dataList: list,
});
})
.catch(err => {
wx.hideLoading();
console.log(err);
});
},
// refreshList() {
// this.fetchList({
// pageNum: 1,
// })
// .then(res => {
// wx.hideLoading();
// console.log(res);
// if (res.data.page) {
// const { list } = res.data.page;
// this.setData!({
// dataList: list,
// });
// }
// })
// .catch(err => {
// wx.hideLoading();
// console.log(err);
// });
// },
// onReachBottom() {
// wx.showLoading({
// title: '加载中',
// });
// let nextPage = this.data.pageNum + 1;
// this.fetchList({
// pageNum: nextPage,
// })
// .then(res => {
// wx.hideLoading();
// console.log(res);
// if (res.data.page && res.data.page.length) {
// const {
// page: { list, pageNum },
// } = res.data;
// this.setData!({
// dataList: [...this.data.dataList, ...list],
// pageNum,
// });
// }
// })
// .catch(err => {
// wx.hideLoading();
// console.log(err);
// });
// },
});
<!-- miniprogram/pages/feedbackDetail/feedbackDetail.wxml -->
<view class="feedbackDetail">
<block wx:if="{{dataList&&dataList.length}}">
<feedback-detail-item wx:for="{{dataList}}" wx:key="id" item-data="{{item}}" bindrefresh="fetchList" />
</block>
<view wx:else style="padding:50rpx;text-align:center">暂无数据</view>
</view>
\ No newline at end of file
/* miniprogram/pages/feedbackDetail/feedbackDetail.wxss */
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<price-and-count tag-data="{{comsumerData}}" /> <price-and-count tag-data="{{comsumerData}}" />
<price-and-count tag-data="{{comsumerCount}}" /> <price-and-count tag-data="{{comsumerCount}}" />
<view class="padding"></view> <view class="padding"></view>
<service-count wx:for="{{serviceList}}" wx:key="{{item.serviceId}}" tag-data="{{item}}" /> <service-count wx:for="{{serviceList}}" wx:key="serviceId" tag-data="{{item}}" />
</view> </view>
<view class="home-box"> <view class="home-box">
<price-and-count tag-data="{{refundData}}" /> <price-and-count tag-data="{{refundData}}" />
......
import { IMyApp } from '../../app'; import { IMyApp } from '../../app';
import { systemFetch } from '../../api/fetch';
type Menu = { type Menu = {
pagePath: string; pagePath: string;
...@@ -27,6 +28,7 @@ const tabList: Menu[] = [ ...@@ -27,6 +28,7 @@ const tabList: Menu[] = [
Page({ Page({
onLoad() { onLoad() {
this.fetchTemplate();
let userRoles = app.globalData.userRoles; let userRoles = app.globalData.userRoles;
let list = userRoles let list = userRoles
.map(item => tabList.find(menu => menu.code === item.menuCode)) .map(item => tabList.find(menu => menu.code === item.menuCode))
...@@ -47,6 +49,18 @@ Page({ ...@@ -47,6 +49,18 @@ Page({
data: { data: {
selected: '', selected: '',
list: [], list: [],
tmplIds: [],
},
fetchTemplate() {
systemFetch({
url: '/boss/login/init/data',
method: 'GET',
}).then(res => {
console.log(res);
this.setData!({
tmplIds: res.templates,
});
});
}, },
clickHandle(e) { clickHandle(e) {
console.log('in click', e); console.log('in click', e);
...@@ -56,5 +70,17 @@ Page({ ...@@ -56,5 +70,17 @@ Page({
this.setData!({ this.setData!({
selected: index, selected: index,
}); });
wx.requestSubscribeMessage({
tmplIds: this.data.tmplIds.map(item => item.templateId),
success(res) {
console.log('in success', res);
},
fail(res) {
console.log('in fail', res);
},
complete(res) {
console.log('in complete', res);
},
});
}, },
}); });
...@@ -30,6 +30,13 @@ const navList = [ ...@@ -30,6 +30,13 @@ const navList = [
code: '9105', code: '9105',
reLaunch: false, reLaunch: false,
}, },
{
name: '设备运营数据',
icon: '../../../images/ic_shebei@2x.png',
url: '/pages/equipment/equipment',
code: '9106',
reLaunch: false,
},
// { // {
// name: '账户提现', // name: '账户提现',
// icon: '../../../images/btn_tixian@2x.png', // icon: '../../../images/btn_tixian@2x.png',
......
...@@ -29,7 +29,8 @@ ...@@ -29,7 +29,8 @@
"ignore": [], "ignore": [],
"disablePlugins": [], "disablePlugins": [],
"outputPath": "" "outputPath": ""
} },
"bundle": false
}, },
"appid": "wx458799fcb933d34f", "appid": "wx458799fcb933d34f",
"simulatorType": "wechat", "simulatorType": "wechat",
...@@ -103,6 +104,27 @@ ...@@ -103,6 +104,27 @@
"id": -1, "id": -1,
"name": "platformFeeRecord", "name": "platformFeeRecord",
"pathName": "pages/platformFeeRecord/platformFeeRecord", "pathName": "pages/platformFeeRecord/platformFeeRecord",
"query": "",
"scene": null
},
{
"id": -1,
"name": "equipment",
"pathName": "pages/equipment/equipment",
"scene": null
},
{
"id": 8,
"name": "equipmentReport",
"pathName": "pages/equipmentReport/equipmentReport",
"query": "areaId=15&areaName=多彩温江校区",
"scene": null
},
{
"id": 9,
"name": "feedbackDetail",
"pathName": "pages/feedbackDetail/feedbackDetail",
"query": "customerName=姜雷&customerPhone=18108096099&id=800069",
"scene": null "scene": null
} }
] ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment