Commit 4afe7367 by 姜雷

Merge branch 'test'

parents d124803f 1414dbe7
...@@ -66,5 +66,8 @@ exports.baseFetch = function (req) { ...@@ -66,5 +66,8 @@ exports.baseFetch = function (req) {
exports.operatorFetch = function (req) { exports.operatorFetch = function (req) {
return fetch(__assign({}, req, { url: constants_1.masterUrl.OPERATOR_SERVER_URL + req.url })); return fetch(__assign({}, req, { url: constants_1.masterUrl.OPERATOR_SERVER_URL + req.url }));
}; };
exports.deviceFetch = function (req) {
return fetch(__assign({}, req, { url: constants_1.masterUrl.DEVICE_SERVEL_URL + req.url }));
};
exports.default = fetch; exports.default = fetch;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmV0Y2guanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJmZXRjaC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsaURBQXdFO0FBRXhFLElBQU0sR0FBRyxHQUFHLE1BQU0sRUFBVSxDQUFDO0FBRTdCLElBQU0sS0FBSyxHQUFHLFVBQUMsR0FBcUI7SUFDbEMsT0FBQSxJQUFJLE9BQU8sQ0FBQyxVQUFDLE9BQU8sRUFBRSxNQUFNO1FBQzFCLElBQU0sS0FBSyxHQUFHLEdBQUcsQ0FBQyxVQUFVLENBQUMsS0FBSyxDQUFDO1FBQ25DLEVBQUUsQ0FBQyxPQUFPLGNBQ0wsR0FBRyxJQUNOLE1BQU0sRUFBRSxLQUFLO2dCQUNYLENBQUMsWUFDRyxLQUFLLE9BQUEsSUFDRixHQUFHLENBQUMsTUFBTSxFQUVqQixDQUFDLENBQUMsR0FBRyxDQUFDLE1BQU0sRUFFZCxPQUFPLEVBQUUsT0FBTyxFQUNoQixJQUFJLEVBQUUsTUFBTSxJQUNaLENBQUM7SUFDTCxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsVUFBQyxHQUFvQztRQUMzQyxJQUFNLGFB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KChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICBjb25zdCB0b2tlbiA9IGFwcC5nbG9iYWxEYXRhLnRva2VuO1xuICAgIHd4LnJlcXVlc3Qoe1xuICAgICAgLi4ucmVxLFxuICAgICAgaGVhZGVyOiB0b2tlblxuICAgICAgICA/IHtcbiAgICAgICAgICAgIHRva2VuLFxuICAgICAgICAgICAgLi4ucmVxLmhlYWRlcixcbiAgICAgICAgICB9XG4gICAgICAgIDogcmVxLmhlYWRlcixcblxuICAgICAgc3VjY2VzczogcmVzb2x2ZSxcbiAgICAgIGZhaWw6IHJlamVjdCxcbiAgICB9KTtcbiAgfSkudGhlbigocmVzOiB3eC5SZXF1ZXN0U3VjY2Vzc0NhbGxiYWNrUmVzdWx0KSA9PiB7XG4gICAgY29uc3QgeyBjb2RlLCAuLi5vdGhlcmtleXMgfSA9IHJlcy5kYXRhO1xuICAgIGlmIChjb2RlID09PSBzdWNjZXNzQ29kZSkge1xuICAgICAgY29uc29sZS5sb2cocmVzKTtcbiAgICAgIGlmIChyZXMuaGVhZGVyWydTZXQtQ29va2llJ10pXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgaGVhZGVyOiByZXMuaGVhZGVyLFxuICAgICAgICAgIGRhdGE6IG90aGVya2V5cyxcbiAgICAgICAgfTtcbiAgICAgIHJldHVybiBvdGhlcmtleXM7XG4gICAgfSBlbHNlIGlmIChjb2RlID09PSBsb2dvdXRvZGUpIHtcbiAgICAgIGFwcC5yZXNldFVzZXJpbmZvKCk7XG4gICAgICB3eC5yZUxhdW5jaCh7XG4gICAgICAgIHVybDogJy9wYWdlcy9pbmRleC9pbmRleCcsXG4gICAgICB9KTtcbiAgICAgIHRocm93IHtcbiAgICAgICAgZXJyTXNnOiByZXMuZGF0YS5tc2cgfHwgJ+e9kee7nOW8guW4uCcsXG4gICAgICB9O1xuICAgIH0gZWxzZSB7XG4gICAgICB0aHJvdyB7XG4gICAgICAgIGVyck1zZzogcmVzLmRhdGEubXNnI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5SZXF1ZXN0T3B0aW9uKSA9PlxuICBmZXRjaCh7IC4uLnJlcSwgdXJsOiBtYXN0ZXJVcmwuU1RBVElTVElDU19TRVJWRVJfVVJMICsgcmVxLnVybCB9KTtcbmV4cG9ydCBjb25zdCBjdXN0b21lckZldGNoID0gKHJlcTogd3guUmVxdWVzdE9wdGlvbikgPT5cbiAgZmV0Y2goeyAuLi5yZXEsIHVybDogbWFzdGVyVXJsLkNVU1RPTUVSX1NFUlZFUl9VUkwgKyByZXEudXJsIH0pO1xuZXhwb3J0IGNvbnN0IGJhc2VGZXRjaCA9IChyZXE6IHd4LlJlcXVlc3RPcHRpb24pID0+XG4gIGZldGNoKHsgLi4ucmVxLCB1cmw6IG1hc3RlclVybC5CQVNFX1NFUlZFUl9VUkwgKyByZXEudXJsIH0pO1xuZXhwb3J0IGNvbnN0IG9wZXJhdG9yRmV0Y2ggPSAocmVxOiB3eC5SZXF1ZXN0T3B0aW9uKSA9PlxuICBmZXRjaCh7IC4uLnJlcSwgdXJsOiBtYXN0ZXJVcmwuT1BFUkFUT1JfU0VSVkVSX1VSTCArIHJlcS51cmwgfSk7XG5leHBvcnQgY29uc3QgZGV2aWNlRmV0Y2ggPSAocmVxOiB3eC5SZXF1ZXN0T3B0aW9uKSA9PlxuICBmZXRjaCh7IC4uLnJlcSwgdXJsOiBtYXN0ZXJVcmwuREVWSUNFX1NFUlZFTF9VUkwgKyByZXEudXJsIH0pO1xuZXhwb3J0IGRlZmF1bHQgZmV0Y2g7XG4iXX0=
\ No newline at end of file \ No newline at end of file
...@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiY29uc3RhbnRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQWEsUUFBQSxNQUFNLEdBQUc7SUFDcEIsaUJBQWlCLEVBQUUsOENBQThDO0lBQ2pFLHFCQUFxQixFQUFFLGtEQUFrRDtJQUN6RSxtQkFBbUIsRUFBRSwyQ0FBMkM7SUFDaEUsZUFBZSxFQUFFLDRDQUE0QztJQUM3RCxtQkFBbUIsRUFBRSxvQ0FBb0M7Q0FDMUQsQ0FBQztBQUNXLFFBQUEsT0FBTyxHQUFHO0lBQ3JCLGlCQUFpQixFQUFFLCtDQUErQztJQUNsRSxxQkFBcUIsRUFBRSxtREFBbUQ7SUFDMUUsbUJBQW1CLEVBQUUsNENBQTRDO0lBQ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aHR0cHM6Ly9kY3h5LXN5c3RlbS1tYW5hZ2UuZGNyeW0uY29tJyxcbiAgU1RBVElTVElDU19TRVJWRVJfVVJMOiAnaHR0cHM6Ly9kY3h5LXN0YXRpc3RpY3MtbWFuYWdlLmRjcnltLmNvbScsXG4gIENVU1RPTUVSX1NFUlZFUl9VUkw6ICdodHRwczovL2RjeHktY3VzdG9tZXItbWFuYWdlLmRjcnltLmNvbScsXG4gIEJBU0VfU0VSVkVSX1VSTDogJ2h0dHBzOi8vZGN4eS1iYXNlLW1hbmFnZS5kY3J5bS5jb20nLFxuICBPUEVSQVRPUl9TRVJWRVJfVVJMOiAnaHR0cHM6Ly9vcC1tYW4tc2Vydi5kY3J5bS5jb20nLFxuICBERVZJQ0VfU0VSVkVMX1VSTDogJ2h0dHBzOi8vZGV2aWNlLW1hbmFnZW1lbnQtYXBpLmRjcnltLmNvbScsXG59O1xuXG5leHBvcnQgY29uc3Qgc3VjY2Vzc0NvZGUgPSAxMDAwO1xuZXhwb3J0IGNvbnN0IGxvZ291dG9kZSA9IC0yO1xuIl19
\ 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=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MsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8vIHBhZ2VzL2NvbXBvbmVudHMvRXF1aXBtZW50Q2hhcnQvRXF1aXBtZW50Q2hhcnQuanNcbkNvbXBvbmVudCh7XG4gIC8qKlxuICAgKiDnu4Tku7bnmoTlsZ7mgKfliJfooahcbiAgICovXG4gIHByb3BlcnRpZXM6IHtcbiAgICBjb2xvcnM6IHtcbiAgICAgIHR5cGU6IEFycmF5LFxuICAgICAgdmFsdWU6IFsnIzY4OTVmZSddLFxuICAgIH0sXG4gICAgZGF0YUxpc3Q6IHtcbiAgICAgIHR5cGU6IEFycmF5LFxuICAgICAgdmFsdWU6IFtdLFxuICAgICAgb2JzZXJ2ZXIobmV3VmFsKSB7XG4gICAgICAgIGxldCBtYXhudW0gPSBNYXRoLmNlaWwoXG4gICAgICAgICAgTWF0aC5tYXgoLi4ubmV3VmFsLm1hcChpdGVtID0+IGl0ZW0udmFsdWUpKSAvIDAuOSxcbiAgICAgICAgKTtcbiAgICAgICAgbGV0IGxpc3QgPSBuZXdWYWwubWFwKGl0ZW0gPT4gKHtcbiAgICAgICAgICAuLi5pdGVtLFxuICAgICAgICAgIHByZWNlbnQ6IE1hdGguY2VpbCgoaXRlbS52YWx1ZSAvIG1heG51bSkgKiAxMDApLFxuICAgICAgICB9KSk7XG4gICAgICAgIHRoaXMuc2V0RGF0YSh7XG4gICAgICAgICAgbGlzdCxcbiAgICAgICAgfSk7XG4gICAgICB9LFxuICAgIH0sXG4gIH0sXG5cbiAgLyoqXG4gICAqIOe7hOS7tueahOWIneWni+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;
}
"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");
Component({
lifetimes: {
attached: function () { },
},
properties: {
totalAmount: {
type: Array,
value: [],
},
areaId: {
type: Number,
value: 0,
observer: function () {
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,
},
methods: {
changeType: function (e) {
console.log(e);
var timetype = e.currentTarget.dataset.timetype;
if (timetype === this.data.timeType)
return;
this.setData({
timeType: timetype,
});
this.fetchData();
this.refreshList();
},
fetchData: function () {
var _this = this;
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);
var _a = res.data, totalConsumeAmount = _a.totalConsumeAmount, totalConsumeCount = _a.totalConsumeCount;
_this.setData({
'comsumerData.count': totalConsumeAmount,
'countData.count': totalConsumeCount,
});
})
.catch(function (err) {
console.log(err);
});
},
fetchList: function (entity) {
return fetch_1.statisticsFetch({
url: '/boss/device/operation/data/detail/paging',
method: 'POST',
data: __assign({ 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: function () {
var _this = this;
this.fetchList({
pageNum: 1,
})
.then(function (res) {
var list = res.data.list;
_this.setData({
pageNum: 1,
dataList: list,
});
})
.catch(function (err) {
console.log(err);
});
},
getMoreListItem: function () {
var _this = this;
this.fetchList({
pageNum: this.data.pageNum + 1,
})
.then(function (res) {
var list = res.data.list;
if (list && list.length) {
_this.setData({
dataList: _this.data.dataList.concat(list),
pageNum: _this.data.pageNum + 1,
});
}
})
.catch(function (err) {
console.log(err);
});
},
changeSortType: function (e) {
var value = e.detail.value;
var item = this.data.sortTypeOptions[value];
console.log(item);
this.setData({
sortTypeIndex: value,
sortType: item.label,
});
this.refreshList();
},
changeDeviceType: function (e) {
console.log(e);
var devicetype = e.currentTarget.dataset.devicetype;
if (devicetype === this.data.deviceType)
return;
this.setData({
deviceType: devicetype,
});
this.refreshList();
},
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRXF1aXBtZW50T3BlcmF0aW9uRGV0YWlscy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIkVxdWlwbWVudE9wZXJhdGlvbkRldGFpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBLDRDQUFxRDtBQUdyRCxTQUFTLENBQUM7SUFDUixTQUFTLEVBQUU7UUFDVCxRQUFRLGdCQUFJLENBQUM7S0FDZDtJQUlELFVBQVUsRUFBRTtRQUNWLFdBQVcsRUFBRTtZQUNYLElBQUksRUFBRSxLQUFLO1lBQ1gsS0FBSyxFQUFFLEVBQUU7U0FDVjtRQUNELE1BQU0sRUFBRTtZQUNOLElBQUksRUFBRSxNQUFNO1lBQ1osS0FBSyxFQUFFLENBQUM7WUFDUixRQUFRO2dCQUNOLElBQUksQ0FBQyxTQUFTLEVBQUUsQ0FBQztnQkFDakIsSUFBSSxDQUFDLFdBQVcsRUFBRSxDQUFDO1lBQ3JCLENBQUM7U0FDRjtLQUNGO0lBS0QsSUFBSSxFQUFFO1FBQ0osZUFBZSxFQUFFO1lBQ2YsRUFBRSxLQUFLLEVBQUUsTUFBTSxFQUFFLEtBQUssRUFBRSxJQUFJLEVBQUU7WUFDOUIsRUFBRSxLQUFLLEVBQUUsS0FBSyxFQUFFLEtBQUssRUFBRSxJQUFJLEVBQUU7U0FDOUI7UUFDRCxhQUFhLEVBQUUsR0FBRztRQUNsQixRQUFRLEVBQUUsTUFBTTtRQUNoQixRQUFRLEVBQUUsQ0FBQztRQUNYLFlBQVksRUFBRTtZQUNaLEtBQUssRUFBRSxNQUFNO1lBQ2IsVUFBVSxFQUFFLE9BQU87WUFDbkIsS0FBSyxFQUFFLENBQUM7U0FDVDtRQUNELFNBQVMsRUFBRTtZQUNULEtBQUssR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aW1ldHlwZSA9PT0gdGhpcy5kYXRhLnRpbWVUeXBlKSByZXR1cm47XG4gICAgICB0aGlzLnNldERhdGEoe1xuICAgICAgICB0aW1lVHlwZTogdGltZXR5cGUsXG4gICAgICB9KTtcbiAgICAgIHRoaXMuZmV0Y2hEYXRhKCk7XG4gICAgICB0aGlzLnJlZnJlc2hMaXN0KCk7XG4gICAgfSxcbiAgICBmZXRjaERhdGEoKSB7XG4gICAgICBzdGF0aXN0aWNzRmV0Y2goe1xuICAgICAgICB1cmw6ICcvYm9zcy9kZXZpY2Uvb3BlcmF0aW9uL2RhdGEvc3VtbWFyeScsXG4gICAgICAgIG1ldGhvZDogJ1BPU1QnLFxuICAgICAgICBkYXRhOiB7XG4gICAgICAgICAgYXJlYUlkOiB0aGlzLmRhdGEuYXJlYUlkLFxuICAgICAgICAgIHRpbWVUeXBlOiB0aGlzLmRhdGEudGltZVR5cGUsXG4gICAgICAgIH0sXG4gICAgICB9KVxuICAgICAgICAudGhlbihyZXMgPT4ge1xuICAgICAgICAgIGNvbnNvbGUubG9nKHJlcyk7XG4gICAgICAgICAgY29uc3QgeyB0b3RhbENvbnN1bWVBbW91bnQsIHRvdGFsQ29uc3VtZUNvdW50IH0gPSByZXMuZGF0YTtcbiAgICAgICAgICB0aGlzLnNldERhdGEoe1xuICAgICAgICAgICAgJ2NvbXN1bWVyRGF0YS5jb3VudCc6IHRvdGFsQ29uc3VtZUFtb3VudCxcbiAgICAgICAgICAgICdjb3VudERhdGEuY291bnQnOiB0b3RhbENvbnN1bWVDb3VudCxcbiAgICAgICAgICB9KTtcbiAgICAgICAgfSlcbiAgICAgICAgLmNhdGNoKGVyciA9PiB7XG4gICAgICAgICAgY29uc29sZS5sb2coZXJyKTtcbiAgICAgICAgfSk7XG4gICAgfSxcbiAgICBmZXRjaExpc3QoZW50aXR5KSB7XG4gICAgICByZXR1cm4gc3RhdGlzdGljc0ZldGNoKHtcbiAgICAgICAgdXJsOiAnL2Jvc3MvZGV2aWNlL29wZXJhdGlvbi9kYXRhL2RldGFpbC9wYWdpbmcnLFxuICAgICAgICBtZXRob2Q6ICdQT1NUJyxcbiAgICAgICAgZGF0YToge1xuICAgICAgICAgIGFyZWFJZDogdGhpcy5kYXRhLmFyZWFJZCxcbiAgICAgICAgICB0aW1lVHlwZTogdGhpcy5kYXRhLnRpbWVUeXBlLFxuICAgICAgICAgIHNvcnRUeXBlOiB0aGlzLmRhdGEuc29ydFR5cGUsXG4gICAgICAgICAgZGV2aWNlVHlwZTogdGhpcy5kYXRhLmRldmljZVR5cGUsXG4gICAgICAgICAgcGFnZU51bTogdGhpcy5kYXRhLnBhZ2VOdW0sXG4gICAgICAgICAgcGFnZVNpemU6IHRoaXMuZGF0YS5wYWdlU2l6ZSxcbiAgICAgICAgICAuLi5lbnRpdHksXG4gICAgICAgIH0sXG4gICAgICB9KTtcbiAgICB9LFxuICAgIHJlZnJlc2hMaXN0KCkge1xuICAgICAgdGhpcy5mZXRjaExpc3Qoe1xuICAgICAgICBwYWdlTnVtOiAxLFxuICAgICAgfSlcbiAgICAgICAgLnRoZW4ocmVzID0+IHtcbiAgICAgICAgICBjb25zdCB7IGxpc3QgfSA9IHJlcy5kYXRhO1xuICAgICAgICAgIHRoaXMuc2V0RGF0YSh7XG4gICAgICAgICAgICBwYWdlTnVtOiAxLFxuICAgICAgICAgICAgZGF0YUxpc3Q6IGxpc3QsXG4gICAgICAgICAgfSk7XG4gICAgICAgIH0pXG4gICAgICAgIC5jYXRjaChlcnIgPT4ge1xuICAgICAgICAgIGNvbnNvbGUubG9nKGVycik7XG4gICAgICAgIH0pO1xuICAgIH0sXG4gICAgZ2V0TW9yZUxpc3RJdGVtKCkge1xuICAgICAgdGhpcy5mZXRjaExpc3Qoe1xuICAgICAgICBwYWdlTnVtOiB0aGlzLmRhdGEucGFnZU51bSArIDEsXG4gICAgICB9KVxuICAgICAgICAudGhlbihyZXMgPT4ge1xuICAgICAgICAgIGNvbnN0IHsgbGlzdCB9ID0gcmVzLmR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k7XG4iXX0=
\ No newline at end of file
{
"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%;
}
"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");
Component({
lifetimes: {
attached: function () { },
},
properties: {
areaId: {
type: Number,
value: 0,
observer: function (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: function () {
this.fetchData();
this.refreshList();
},
fetchData: function () {
var _this = this;
fetch_1.deviceFetch({
url: "/device/report/deviceStautsCount/" + this.data.areaId,
})
.then(function (res) {
console.log(res);
var list = res.data.map(function (item) {
var label = '';
switch (item.status) {
case 'enable':
label = '启用设备';
break;
case 'forbidden':
label = '禁用设备';
break;
case 'online':
label = '在线设备';
break;
case 'offline':
label = '离线设备';
break;
default:
break;
}
return __assign({}, item, { label: label });
});
_this.setData({
tabs: list,
});
})
.catch(function (err) {
console.log(err);
});
},
fetchList: function (entity) {
return fetch_1.deviceFetch({
url: "/device/report/status/" + this.data.status,
data: __assign({ areaId: this.data.areaId, pageNum: this.data.pagination[this.data.status].pageNum, pageSize: this.data.pagination[this.data.status].pageSize }, entity),
});
},
refreshList: function () {
var _this = this;
wx.showLoading({
title: '加载中',
});
this.fetchList()
.then(function (res) {
wx.hideLoading();
console.log(res);
if (res.data && res.data.length) {
_this.setData((_a = {},
_a['dataList.' + _this.data.status] = res.data,
_a));
}
var _a;
})
.catch(function (err) {
wx.hideLoading();
console.log(err);
});
},
getMoreListItem: function () {
var _this = this;
wx.showLoading({
title: '加载中',
});
var nextPage = this.data.pagination[this.data.status].pageNum + 1;
this.fetchList({
pageNum: nextPage,
})
.then(function (res) {
wx.hideLoading();
console.log(res);
if (res.data && res.data.length) {
_this.setData((_a = {},
_a['dataList.' + _this.data.status] = _this.data.dataList[_this.data.status].concat(res.data),
_a['pagination.' + _this.data.status + '.pageNum'] = nextPage,
_a));
}
var _a;
})
.catch(function (err) {
wx.hideLoading();
console.log(err);
});
},
changeTab: function (e) {
var status = e.currentTarget.dataset.status;
console.log(e, status);
this.setData({
status: status,
});
if (!this.data.dataList[status].length)
this.refreshList();
},
openEquipment: function (e) {
var _this = this;
var _a = e.currentTarget.dataset, code = _a.code, type = _a.type;
console.log(code);
fetch_1.deviceFetch({
url: "/device/" + code + "/" + type + "/enable",
method: 'POST',
})
.then(function (res) {
wx.showToast({
title: res.msg || '操作成功',
});
_this.refreshList();
})
.catch(function (err) {
console.log(err);
});
},
closeEquipment: function (e) {
var _this = this;
var _a = e.currentTarget.dataset, code = _a.code, type = _a.type;
console.log(code);
fetch_1.deviceFetch({
url: "/device/" + code + "/" + type + "/forbidden",
method: 'POST',
})
.then(function (res) {
wx.showToast({
title: res.msg || '操作成功',
});
_this.refreshList();
})
.catch(function (err) {
console.log(err);
});
},
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRXF1aXBtZW50U3RhdGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJFcXVpcG1lbnRTdGF0ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUEsNENBQWlEO0FBR2pELFNBQVMsQ0FBQztJQUNSLFNBQVMsRUFBRTtRQUNULFFBQVEsZ0JBQUksQ0FBQztLQUNkO0lBSUQsVUFBVSxFQUFFO1FBQ1YsTUFBTSxFQUFFO1lBQ04sSUFBSSxFQUFFLE1BQU07WUFDWixLQUFLLEVBQUUsQ0FBQztZQUNSLFFBQVEsWUFBQyxNQUF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N0IGxpc3QgPSByZXMuZGF0YS5tYXAoaXRlbSA9PiB7XG4gICAgICAgICAgICBsZXQgbGFiZWwgPSAnJztcbiAgICAgICAgICAgIHN3aXRjaCAoaXRlbS5zdGF0dXMpIHtcbiAgICAgICAgICAgICAgY2FzZSAnZW5hYmxlJzpcbiAgICAgICAgICAgICAgICBsYWJlbCA9ICflkK/nlKjorr7lpIcnO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICBjYXNlICdmb3JiaWRkZW4nOlxuICAgICAgICAgICAgICAgIGxhYmVsID0gJ+emgeeUqOiuvuWkhyc7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgIGNhc2UgJ29ubGluZSc6XG4gICAgICAgICAgICAgICAgbGFiZWwgPSAn5Zyo57q/6K6+5aSHJztcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgY2FzZSAnb2ZmbGluZSc6XG4gICAgICAgICAgICAgICAgbGFiZWwgPSAn56a757q/6K6+5aSHJztcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgIC4uLml0ZW0sXG4gICAgICAgICAgICAgIGxhYmVsLFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgICB0aGlzLnNldERhdGEoe1xuICAgICAgICAgICAgdGFiczogbGlzdCxcbiAgICAgICAgICB9KTtcbiAgICAgICAgfSlcbiAgICAgICAgLmNhdGNoKGVyciA9PiB7XG4gICAgICAgICAgY29uc29sZS5sb2coZXJyKTtcbiAgICAgICAgfSk7XG4gICAgfSxcbiAgICBmZXRjaExpc3QoZW50aXR5KSB7XG4gICAgICByZXR1cm4gZGV2aWNlRmV0Y2goe1xuICAgICAgICB1cmw6IGAvZGV2aWNlL3JlcG9ydC9zd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V4dFBhZ2UgPSB0aGlzLmRhdGEucGFnaW5hdGlvblt0aGlzLmRhdGEuc3RhdHVzXS5wYWdlTnVtICsgMTtcbiAgICAgIHRoaXMuZmV0Y2hMaXN0KHtcbiAgICAgICAgcGFnZU51bTogbmV4dFBhZ2UsXG4gICAgICB9KVxuICAgICAgICAudGhlbihyZXMgPT4ge1xuICAgICAgICAgIHd4LmhpZGVMb2FkaW5nKCk7XG4gICAgICAgICAgY29uc29sZS5sb2cocmVzKTtcbiAgICAgICAgICBpZiAocmVzLmRhdGEgJiYgcmVzLmRhdGEubGVuZ3RoKSB7XG4gICAgICAgICAgICB0aGlzLnNldERhdGEoe1xuICAgICAgICAgICAgICBbJ2RhdGFMaXN0LicgKyB0aGlzLmRhdGEuc3RhdHVzXTogW1xuICAgICAgICAgICAgICAgIC4uLnRoaXMuZGF0YS5kYXRhTGlzdFt0aGlzLmRhdGEuc3RhdHVzXSxcbiAgICAgICAgICAgICAgICAuLi5yZXMuZGF0YSxcbiAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgWydwYWdpbmF0aW9uLicgKyB0aGlzLmRhdGEuc3RhdHVzICsgJy5wYWdlTnVtJ106IG5leHRQYWdlLFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KVxuICAgICAgICAuY2F0Y2goZXJyID0+IHtcbiAgICAgICAgICB3eC5oaWRlTG9hZGluZygpO1xuICAgICAgICAgIGNvbnNvbGUubG9nKGVycik7XG4gICAgICAgIH0pO1xuICAgIH0sXG4gICAgY2hhbmdlVGFiKGUpIHtcbiAgICAgIGNvbnN0IHsgc3RhdHVzIH0gPSBlLmN1cnJlbnRUYXJnZXQuZGF0YXNldDtcbiAgICAgIGNvbnNvbGUubG9nKGUsIHN0YXR1cyk7XG4gICAgICB0aGlzLnNldERhdGEoe1xuICAgICAgICBzdGF0dXMsXG4gICAgICB9KTtcbiAgICAgIGlmICghdGhpcy5kYXRhLmRhdGFMaXN0W3N0YXR1c10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ICAgfSlcbiAgICAgICAgLmNhdGNoKGVyciA9PiB7XG4gICAgICAgICAgY29uc29sZS5sb2coZXJyKTtcbiAgICAgICAgfSk7XG4gICAgfSxcbiAgfSxcbn0pO1xuIl19
\ No newline at end of file
{
"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;
}
"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");
Component({
lifetimes: {
attached: function () {
if (!this.data.warningTypeRange) {
this.fetchWarningLevelList();
}
},
},
properties: {
areaId: {
type: Number,
value: 0,
observer: function (newVal) {
this.refreshList();
},
},
},
data: {
warningLevelRange: [],
warnLevelIndex: '',
warnLevel: 0,
deviceLocation: '',
dataList: [],
pageNum: 1,
pageSize: 10,
},
methods: {
fetchWarningLevelList: function () {
var _this = this;
fetch_1.deviceFetch({
url: '/device/warning/dict/illegalOperations',
data: {
warnLevel: 1,
},
})
.then(function (res) {
console.log(res);
_this.setData({
warningLevelRange: res.data,
});
})
.catch(function (err) {
console.log(err);
});
},
changeWarningType: function (e) {
var index = e.detail.value;
if (index === this.data.warnLevelIndex)
return;
var item = this.data.warningLevelRange[index];
console.log(item);
this.setData({
warnLevelIndex: index,
warnLevel: item.key,
});
this.refreshList();
},
changeLocation: function (e) {
var value = e.detail.value;
console.log(value);
this.setData({
deviceLocation: value,
});
this.refreshList();
},
fetchList: function (entity) {
if (this.data.warnLevel) {
entity.operation = this.data.warnLevel;
}
if (this.data.deviceLocation) {
entity.deviceLocation = this.data.deviceLocation;
}
return fetch_1.deviceFetch({
url: '/device/warning/paging',
method: 'POST',
data: __assign({ warnLevel: 1, operator: true, areaId: this.data.areaId, pageNum: this.data.pageNum, pageSize: this.data.pageSize }, entity),
});
},
refreshList: function () {
var _this = this;
wx.showLoading({
title: '加载中',
});
this.fetchList({})
.then(function (res) {
wx.hideLoading();
console.log(res);
var list = res.data.list;
if (list && list.length) {
_this.setData({
dataList: list,
});
}
})
.catch(function (err) {
wx.hideLoading();
console.log(err);
});
},
getMoreListItem: function () {
var _this = this;
wx.showLoading({
title: '加载中',
});
var nextPage = this.data.pageNum + 1;
this.fetchList({
pageNum: nextPage,
})
.then(function (res) {
wx.hideLoading();
console.log(res);
var _a = res.data, list = _a.list, pageNum = _a.pageNum;
if (list && list.length) {
_this.setData({
dataList: _this.data.dataList.concat(list),
pageNum: pageNum,
});
}
})
.catch(function (err) {
wx.hideLoading();
console.log(err);
});
},
openEquipment: function (e) {
var _this = this;
var _a = e.currentTarget.dataset, code = _a.code, type = _a.type;
console.log(code);
fetch_1.deviceFetch({
url: "/device/" + code + "/" + type + "/enable",
method: 'POST',
})
.then(function (res) {
wx.showToast({
title: res.msg || '操作成功',
});
_this.refreshList();
})
.catch(function (err) {
console.log(err);
});
},
closeEquipment: function (e) {
var _this = this;
var _a = e.currentTarget.dataset, code = _a.code, type = _a.type;
console.log(code);
fetch_1.deviceFetch({
url: "/device/" + code + "/" + type + "/forbidden",
method: 'POST',
})
.then(function (res) {
wx.showToast({
title: res.msg || '操作成功',
});
_this.refreshList();
})
.catch(function (err) {
console.log(err);
});
},
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRXF1aXBtZW50V2FybmluZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIkVxdWlwbWVudFdhcm5pbmcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBLDRDQUFpRDtBQUdqRCxTQUFTLENBQUM7SUFDUixTQUFTLEVBQUU7UUFDVCxRQUFRO1lBQ04sRUFBRSxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLGdCQUFnQixDQUFDLENBQUMsQ0FBQztnQkFDaEMsSUFBSSxDQUFDLHFCQUFxQixFQUFFLENBQUM7WUFDL0IsQ0FBQztRQUNILENBQUM7S0FDRjtJQUlELFVBQVUsRUFBRTtRQUNWLE1BQU0sRUFBRTtZQUNOLElBQUksRUFBRSxNQUFNO1lBQ1osS0FBSyxFQUFFLENBQUM7WUFDUixRQUFRLFlBQUMsTUFBTTtnQkFDYixJQUFJLENBQUMsV0FBVyxFQUFFLENBQUM7WUFDckIsQ0FBQzt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0YToge1xuICAgICAgICAgIHdhcm5MZXZlbDogMSxcbiAgICAgICAgfSxcbiAgICAgIH0pXG4gICAgICAgIC50aGVuKHJlcyA9PiB7XG4gICAgICAgICAgY29uc29sZS5sb2cocmVzKTtcbiAgICAgICAgICB0aGlzLnNldERhdGEoe1xuICAgICAgICAgICAgd2FybmluZ0xldmVsUmFuZ2U6IHJlcy5kYXRhLFxuICAgICAgICAgIH0pO1xuICAgICAgICB9KVxuICAgICAgICAuY2F0Y2goZXJyID0+IHtcbiAgICAgICAgICBjb25zb2xlLmxvZyhlcnIpO1xuICAgICAgICB9KTtcbiAgICB9LFxuICAgIGNoYW5nZVdhcm5pbmdUeXBlKGUpIHtcbiAgICAgIGNvbnN0IGluZGV4ID0gZS5kZXRhaWwudmFsdWU7XG4gICAgICBpZiAoaW5kZXggPT09IHRoaXMuZGF0YS53YXJuTGV2ZWxJbmRleCkgcmV0dXJuO1xuICAgICAgY29uc3QgaXRlbSA9IHRoaXMuZGF0YS53YXJuaW5nTGV2ZWxSYW5nZVtpbmRleF07XG4gICAgICBjb25zb2xlLmxvZyhpdGVtKTtcbiAgICAgIHRoaXMuc2V0RGF0YSh7XG4gICAgICAgIHdhcm5MZXZlbEluZGV4OiBpbmRleCxcbiAgICAgICAgd2FybkxldmVsOiBpdGVtLmtleSxcbiAgICAgIH0pO1xuICAgICAgdGhpcy5yZWZyZXNoTGlzdCgpO1xuICAgIH0sXG4gICAgY2hhbmdlTG9jYXRpb24oZSkge1xuICAgICAgY29uc3QgeyB2YWx1ZSB9ID0gZS5kZXRhaWw7XG4gICAgICBjb25zb2xlLmxvZyh2YWx1ZSk7XG4gICAgICB0aGlzLnNldERhdGEoe1xuICAgICAgICBkZXZpY2VMb2NhdGlvbjogdmFsdWUsXG4gICAgICB9KTtcbiAgICAgIHRoaXMucmVmcmVzaExpc3QoKTtcbiAgICB9LFxuICAgIGZldGNoTGlzdChlbnRpdHkpIHtcbiAgICAgIGlmICh0aGlzLmRhdGEud2FybkxldmVsKSB7XG4gICAgICAgIGVudGl0eS5vcGVyYXRpb24gPSB0aGlzLmRhdGEud2FybkxldmVsO1xuICAgICAgfVxuICAgICAgaWYgKHRoaXMuZGF0YS5kZXZpY2VMb2NhdGlvbikge1xuICAgICAgICBlbnRpdHkuZGV2aWNlTG9jYXRpb24gPSB0aGlzLmRhdGEuZGV2aWNlTG9jYXRpb247XG4gICAgICB9XG4gICAgICByZXR1cm4gZGV2aWNlRmV0Y2goe1xuICAgICAgICB1cmw6ICcvZGV2aWNlL3dhcm5pbmcvcGFnaW5nJyxcbiAgICAgICAgbWV0aG9kOiAnUE9TVCcsXG4gICAgICAgIGRhdGE6IHtcbiAgICAgICAgICB3YXJuTGV2ZWw6IDEsXG4gICAgICAgICAgb3BlcmF0b3I6IHRydWUsXG4gICAgICAgICAgYXJlYUlkOiB0aGlzLmRhdGEuYXJlYUlkLFxuICAgICAgICAgIHBhZ2VOdW06IHRoaXMuZGF0YS5wYWdlTnVtLFxuICAgICAgICAgIHBhZ2VTaXplOiB0aGlzLmRhdGEucGFnZVNpemUsXG4gICAgICAgICAgLi4uZW50aXR5LFxuICAgICAgICB9LFxuICAgICAgfSk7XG4gICAgfSxcbiAgICByZWZyZXNoTGlzdCgpIHtcbiAgICAgIHd4LnNob3dMb2FkaW5nKHtcbiAgICAgICAgdGl0bGU6ICfliqDovb3kuK0nLFxuICAgICAgfSk7XG4gICAgICB0aGlzLmZldGNoTGlzdCh7fSlcbiAgICAgICAgLnRoZW4ocmVzID0+IHtcbiAgICAgICAgICB3eC5oaWRlTG9hZGluZygpO1xuICAgICAgICAgIGNvbnNvbGUubG9nKHJlcyk7XG4gICAgICAgICAgY29uc3QgeyBsaXN0IH0gPSByZXMuZGF0YTtcbiAgICAgICAgICBpZiAobGlzdCAmJiBsaXN0Lmxlbmd0aCkge1xuICAgICAgICAgICAgdGhpcy5zZXREYXRhKHtcbiAgICAgICAgICAgICAgZGF0YUxpc3Q6IGxpc3QsXG4gICAgICAgICAgICB9K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GUubG9nKGNvZGUpO1xuICAgICAgZGV2aWNlRmV0Y2goe1xuICAgICAgICB1cmw6IGAvZGV2aWNlLyR7Y29kZX0vJHt0eXBlfS9lbmFibGVgLFxuICAgICAgICBtZXRob2Q6ICdQT1NUJyxcbiAgICAgIH0pXG4gICAgICAgIC50aGVuKHJlcyA9PiB7XG4gICAgICAgICAgd3guc2hvd1RvYXN0KHtcbiAgICAgICAgICAgIHRpdGxlOiByZXMubXNnIHx8ICfmk43kvZzmiJDlip8nLFxuICAgICAgICAgIH0pO1xuICAgICAgICAgIHRoaXMucmVmcmVzaExpc3QoKTtcbiAgICAgICAgfSlcbiAgICAgICAgLmNhdGNoKGVyciA9PiB7XG4gICAgICAgICAgY29uc29sZS5sb2coZXJyKTtcbiAgICAgICAgfSk7XG4gICAgfSxcbiAgICBjbG9zZUVxdWlwbWVudChlKSB7XG4gICAgICBjb25zdCB7IGNvZGUsIHR5cGUgfSA9IGUuY3VycmVudFRhcmdldC5kYXRhc2V0O1xuICAgICAgY29uc29sZS5sb2coY29kZSk7XG4gICAgICBkZXZpY2VGZXRjaCh7XG4gICAgICAgIHVybDogYC9kZXZpY2UvJHtjb2RlfS8ke3R5cGV9L2ZvcmJpZGRlbmAsXG4gICAgICAgIG1ldGhvZDogJ1BPU1QnLFxuICAgICAgfSlcbiAgICAgICAgLnRoZW4ocmVzID0+IHtcbiAgICAgICAgICB3eC5zaG93VG9hc3Qoe1xuICAgICAgICAgICAgdGl0bGU6IHJlcy5tc2cgfHwgJ+aTjeS9nOaIkOWKnycsXG4gICAgICAgICAgfSk7XG4gICAgICAgICAgdGhpcy5yZWZyZXNoTGlzdCgpO1xuICAgICAgICB9KVxuICAgICAgICAuY2F0Y2goZXJyID0+IHtcbiAgICAgICAgICBjb25zb2xlLmxvZyhlcnIpO1xuICAgICAgICB9KTtcbiAgICB9LFxuICB9LFxufSk7XG4iXX0=
\ No newline at end of file
{
"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,
});
},
}, },
}); });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRmVlZGJhY2tJdGVtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiRmVlZGJhY2tJdGVtLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsNENBQW1EO0FBR25ELFNBQVMsQ0FBQztJQUlSLFVBQVUsRUFBRTtRQUNWLFlBQVksRUFBRTtZQUNaLElBQUksRUFBRSxNQUFNO1lBQ1osS0FBSyxFQUFFO2dCQUNMLE1BQU0sRUFBRSxDQUFDO2dCQUNULFFBQVEsRUFBRSxFQUFFO2dCQUNaLFVBQVUsRUFBRSxDQUFDO2dCQUNiLFlBQVksRUFBRSxFQUFFO2dCQUNoQixhQUFhLEVBQUUsRUFBRTtnQkFDakIsV0FBVyxFQUFFLEVBQUU7Z0JBQ2YsZUFBZSxFQUFFLEVBQUU7Z0JBQ25CLEVBQUUsRUFBRSxDQUFDO2dCQUNMLEtBQUssRUFBRSxFQUFFO2FBQ1Y7U0FDRjtLQUNGO0lBS0QsSUFBSSxFQUFFO1FBQ0osVUFBVSxFQUFFLEVBQUU7S0FDZjtJQUtELE9BQU8sRUFBRTtRQUNQLG1CQUFtQjtZQUNqQixPQUFPLENBQUMsR0FBRyxDQUFDLHdCQUF3QixDQUFDLENBQUM7WUFDdEMsRUFBRSxDQUFDLGFBQWEsQ0FBQztnQkFDZixXQUFXLEVBQUUsSUFBSSxDQUFDLElBQUksQ0FBQyxZQUFZLENBQUMsYUFBYTtnQkFDakQsT0FBTyxFQUFFO29CQUNQLE9BQU8sQ0FBQyxHQUFHLENBQUMsU0FBUyxDQU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biAgICAgICAgbWV0aG9kOiAnUFVUJyxcbiAgICAgICAgZGF0YToge1xuICAgICAgICAgIGlkOiB0aGlzLmRhdGEuZmVlZGJhY2tEYXRhLmlkLFxuICAgICAgICAgIHJlcGxheUNvbnRlbnQ6IHZhbCxcbiAgICAgICAgICBzdGF0ZTogJzMnLFxuICAgICAgICB9LFxuICAgICAgfSlcbiAgICAgICAgLnRoZW4ocmVzID0+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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU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qL1xuICBwcm9wZXJ0aWVzOiB7XG4gICAgdGFnRGF0YToge1xuICAgICAgdHlwZTogT2JqZWN0LFxuICAgICAgdmFsdWU6IHtcbiAgICAgICAgdGl0bGU6ICcnLFxuICAgICAgICBudW1iZXJUeXBlOiAnJyxcbiAgICAgICAgY291bnQ6IDAsXG4gICAgICB9LFxuICAgICAgb2JzZXJ2ZXI6IGZ1bmN0aW9uKG5ld1ZhbCkge1xuICAgICAgICBjb25zdCB7IGNvdW50LCBudW1iZXJUeXBlIH0gPSBuZXdWYWw7XG4gICAgICAgIGxldCBmb3JtYXRDb3VudCA9IGNvdW50LnRvU3RyaW5nKCk7XG4gICAgICAgIGlmIChudW1iZXJUeXBlID09PSAncHJpY2UnKSB7XG4gICAgICAgICAgZm9ybWF0Q291bnQgPSBmb3JtYXRQcmljZShjb3VudCk7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5zZXREYXRhKHtcbiAgICAgICAgICBmb3JtYXRDb3VudCxcbiAgICAgICAgfSk7XG4gICAgICB9LFxuICAgIH0sXG4gIH0sXG4gIC8qKlxuICAgKiDnu4Tku7bnmoTliJ3lp4vmlbDmja5cbiAgICovXG4gIGRhdGE6IHtcbiAgICBmb3JtYXRDb3VudDogJzAnLFxuICB9LFxuXG4gIC8qKlxuICAgKiDnu4Tku7bnmoTmlrnms5XliJfooahcbiAgICovXG4gIG1ldGhvZHM6IHt9LFxufSk7XG4iXX0= //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUHJpY2VBbmRDb3VudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIlByaWNlQW5kQ291bnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSw0Q0FBa0Q7QUFHbEQsU0FBUyxDQUFDO0lBSVIsVUFBVSxFQUFFO1FBQ1YsT0FBTyxFQUFFO1lBQ1AsSUFBSSxFQUFFLE1BQU07WUFDWixLQUFLLEVBQUU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HVlOiB7XG4gICAgICAgIHRpdGxlOiAnJyxcbiAgICAgICAgbnVtYmVyVHlwZTogJycsXG4gICAgICAgIGNvdW50OiAwLFxuICAgICAgfSxcbiAgICAgIG9ic2VydmVyOiBmdW5jdGlvbihuZXdWYWwpIHtcbiAgICAgICAgY29uc3QgeyBjb3VudCwgbnVtYmVyVHlwZSB9ID0gbmV3VmFsO1xuICAgICAgICBsZXQgZm9ybWF0Q291bnQgPSBjb3VudC50b1N0cmluZygpO1xuICAgICAgICBpZiAobnVtYmVyVHlwZSA9PT0gJ3ByaWNlJykge1xuICAgICAgICAgIGZvcm1hdENvdW50ID0gZm9ybWF0UHJpY2UoY291bnQpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGZvcm1hdENvdW50ID0gZm9ybWF0UHJpY2UoY291bnQpLnNwbGl0KCcuJylbMF07XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5zZXREYXRhKHtcbiAgICAgICAgICBmb3JtYXRDb3VudCxcbiAgICAgICAgfSk7XG4gICAgICB9LFxuICAgIH0sXG4gIH0sXG4gIC8qKlxuICAgKiDnu4Tku7bnmoTliJ3lp4vmlbDmja5cbiAgICovXG4gIGRhdGE6IHtcbiAgICBmb3JtYXRDb3VudDogJzAnLFxuICB9LFxuXG4gIC8qKlxuICAgKiDnu4Tku7bnmoTmlrnms5XliJfooahcbiAgICovXG4gIG1ldGhvZHM6IHt9LFxufSk7XG4iXX0=
\ 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({ ...@@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dWU6ICdkYXknLFxuICAgIH0sXG4gICAgdmFsdWU6IHtcbiAgICAgIHR5cGU6IFN0cmluZyxcbiAgICAgIHZhbHVlOiAnJyxcbiAgICAgIG9ic2VydmVyKG5ld1ZhbCkge1xuICAgICAgICBjb25zb2xlLmxvZygnaW4gc2VsZWN0IG9iJywgbmV3VmFsKTtcbiAgICAgICAgdGhpcy5zZXREYXRhKHsgc2VsZWN0ZWQ6IG5ld1ZhbCB9KTtcbiAgICAgIH0sXG4gICAgfSxcbiAgfSxcbiAgZGF0YToge1xuICAgIHNlbGVjdGVkOiAnJyxcbiAgfSxcbiAgbWV0aG9kczoge1xuICAgIGJpbmRQaWNrZXJDaGFuZ2UoZSkge1xuICAgICAgY29uc3QgeyB2YWx1ZSB9ID0gZS5kZXRhaWw7XG4gICAgICBjb25zb2xlLmxvZyh2YWx1ZSk7XG4gICAgICB0aGlzLnNldERhdGEhKHtcbiAgICAgICAgc2VsZWN0ZWQ6IHZhbHVlLFxuICAgICAgfSk7XG4gICAgICB0aGlzLnRyaWdnZXJFdmVudCgnY2hhbmdlJywgeyB2YWx1ZSB9KTtcbiAgICB9LFxuICB9LFxufSk7XG4iXX0=
\ 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmVlZGJhY2tEZXRhaWxJdGVtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZmVlZGJhY2tEZXRhaWxJdGVtLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsNENBQW1EO0FBR25ELFNBQVMsQ0FBQztJQUlSLFVBQVUsRUFBRTtRQUNWLFFBQVEsRUFBRSxFQUFFLElBQUksRUFBRSxNQUFNLEVBQUUsS0FBSyxFQUFFLEVBQUUsRUFBRTtLQUN0QztJQUtELElBQUksRUFBRTtRQUNKLFVBQVUsRUFBRSxFQUFFO0tBQ2Y7SUFLRCxPQUFPLEVBQUU7UUFDUCxXQUFXLFlBQUMsQ0FBQztZQUNYLElBQU0sR0FBRyxHQUFHLENBQUMsQ0FBQyxNQUFNLENBQUMsS0FBSyxDQUFDO1lBQzNCLElBQUksQ0FBQyxPQUFRLENBQUM7Z0JBQ1osVUFBVSxFQUFFLEdBQUc7YUFDaEIsQ0FBQyxDQUFDO1FBQ0wsQ0FBQztRQUVELFlBQVksWUFBQyxDQUFDO1lBQWQsaUJBNkJDO1lBNUJTLEl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ICAgICAgICB9KTtcbiAgICAgICAgICB0aGlzLnNldERhdGEhKHtcbiAgICAgICAgICAgIGlucHV0VmFsdWU6ICcnLFxuICAgICAgICAgIH0pO1xuICAgICAgICAgIHRoaXMudHJpZ2dlckV2ZW50KCdyZWZyZXNoJywge30pO1xuICAgICAgICB9KVxuICAgICAgICAuY2F0Y2goKGVycjogd3guR2VuZXJhbENhbGxiYWNrUmVzdWx0KSA9PiB7XG4gICAgICAgICAgd3guc2hvd1RvYXN0KHtcbiAgICAgICAgICAgIHRpdGxlOiBlcnIuZXJyTXNnLFxuICAgICAgICAgICAgaWNvbjogJ25vbmUnLFxuICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICB9LFxuICB9LFxufSk7XG4iXX0=
\ 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 });
},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eyBkYXRhOiBpdGVtIH0pO1xuICAgICAgfSxcbiAgICB9KTtcbiAgfSxcbn0pO1xuIl19
\ 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXF1aXBtZW50UmVwb3J0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZXF1aXBtZW50UmVwb3J0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQSx5Q0FBK0Q7QUFHL0QsSUFBSSxDQUFDO0lBSUgsSUFBSSxFQUFFO1FBQ0osTUFBTSxFQUFFLElBQUk7UUFDWixRQUFRLEVBQUUsRUFBRTtRQUNaLElBQUksRUFBRSxDQUFDO1FBQ1AsUUFBUSxFQUFFLENBQUM7UUFDWCxXQUFXLEVBQUUsRUFBRTtLQUNoQjtJQUtELE1BQU0sRUFBRSxVQUFTLE9BQU87UUFBaEIsaUJBMkJQO1FBMUJDLE9BQU8sQ0FBQyxHQUFHLENBQUMsT0FBTyxDQUFDLENBQUM7UUFD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RnJvbU9wZW5lclBhZ2UnLCByZXMgPT4ge1xuICAgICAgY29uc29sZS5sb2cocmVzKTtcbiAgICAgIHRoaXMuc2V0RGF0YSEoe1xuICAgICAgICB0b3RhbEFtb3VudDogcmVzLmRhdGEudG90YWxBbW91bnQubWFwKGl0ZW0gPT4gKHtcbiAgICAgICAgICAuLi5pdGVtLFxuICAgICAgICAgIHR5cGU6XG4gICAgICAgICAgICBpdGVtLmtleSA9PT0gJ+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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmVlZGJhY2tEZXRhaWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJmZWVkYmFja0RldGFpbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHlDQUFnRDtBQUdoRCxJQUFJLENBQU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Fjay8ke3RoaXMuZGF0YS5pZH1gLFxuICAgIH0pXG4gICAgICAudGhlbihyZXMgPT4ge1xuICAgICAgICB3eC5oaWRlTG9hZGluZygpO1xuICAgICAgICBjb25zdCB7IGxpc3QgfSA9IHJlcy5kYXRhO1xuICAgICAgICB0aGlzLnNldERhdGEhKHtcbiAgICAgICAgICBkYXRhTGlzdDogbGlzdCxcbiAgICAgICAgfSk7XG4gICAgICB9KVxuICAgICAgLmNhdGNoKGVyciA9PiB7XG4gICAgICAgIHd4LmhpZGVMb2FkaW5nKCk7XG4gICAgICAgIGNvbnNvbGUubG9nKGVycik7XG4gICAgICB9KTtcbiAgfSxcblxuICAvLyByZWZyZXNoTGlzdCgpIHtcbiAgLy8gICB0aGlzLmZldGNoTGlzdCh7XG4gIC8vICAgICBwYWdlTnVtOiAxLFxuICAvLyAgIH0pXG4gIC8vICAgICAudGhlbihyZXMgPT4ge1xuICAvLyAgICAgICB3eC5oaWRlTG9hZGluZygpO1xuICAvLyAgICAgICBjb25zb2xlLmxvZyhyZXMpO1xuICAvLyAgICAgICBpZiAocmVzLmRhdGEucGFnZSkge1xuICAvLyAgICAgICAgIGNvbnN0IHsgbGlzdCB9ID0gcmVzLmRhdGEucGFnZTtcbiAgLy8gICAgICAgICB0aGlzLnNldERhdGEhKHtcbiAgLy8gICAgICAgICAgIGRhdGFMaXN0OiBsaXN0LFxuICAvLyAgICAgICAgIH0pO1xuICAvLyAgICAgICB9XG4gIC8vICAgICB9KVxuICAvLyAgICAgLmNhdGNoKGVyciA9PiB7XG4gIC8vICAgICAgIHd4LmhpZGVMb2FkaW5nKCk7XG4gIC8vICAgICAgIGNvbnNvbGUubG9nKGVycik7XG4gIC8vICAgICB9KTtcbiAgLy8gfSxcblxuICAvLyBvblJlYWNoQm90dG9tKCkge1xuICAvLyAgIHd4LnNob3dMb2FkaW5nKHtcbiAgLy8gICAgIHRpdGxlOiAn5Yqg6L295LitJyxcbiAgLy8gICB9KTtcbiAgLy8gICBsZXQgbmV4dFBhZ2UgPSB0aGlzLmRhdGEucGFnZU51bSArIDE7XG4gIC8vICAgdGhpcy5mZXRjaExpc3Qoe1xuICAvLyAgICAgcGFnZU51bTogbmV4dFBhZ2UsXG4gIC8vICAgfSlcbiAgLy8gICAgIC50aGVuKHJlcyA9PiB7XG4gIC8vICAgICAgIHd4LmhpZGVMb2FkaW5nKCk7XG4gIC8vICAgICAgIGNvbnNvbGUubG9nKHJlcyk7XG4gIC8vICAgICAgIGlmIChyZXMuZGF0YS5wYWdlICYmIHJlcy5kYXRhLnBhZ2UubGVuZ3RoKSB7XG4gIC8vICAgICAgICAgY29uc3Qge1xuICAvLyAgICAgICAgICAgcGFnZTogeyBsaXN0LCBwYWdlTnVtIH0sXG4gIC8vICAgICAgICAgfSA9IHJlcy5kYXRhO1xuICAvLyAgICAgICAgIHRoaXMuc2V0RGF0YSEoe1xuICAvLyAgICAgICAgICAgZGF0YUxpc3Q6IFsuLi50aGlzLmRhdGEuZGF0YUxpc3QsIC4uLmxpc3RdLFxuICAvLyAgICAgICAgICAgcGFnZU51bSxcbiAgLy8gICAgICAgICB9KTtcbiAgLy8gICAgICAgfVxuICAvLyAgICAgfSlcbiAgLy8gICAgIC5jYXRjaChlcnIgPT4ge1xuICAvLyAgICAgICB3eC5oaWRlTG9hZGluZygpO1xuICAvLyAgICAgICBjb25zb2xlLmxvZyhlcnIpO1xuICAvLyAgICAgfSk7XG4gIC8vIH0sXG59KTtcbiJdfQ==
\ 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}}" />
......
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
var fetch_1 = require("../../api/fetch");
var app = getApp(); var app = getApp();
var tabList = [ var tabList = [
{ {
...@@ -19,6 +20,7 @@ var tabList = [ ...@@ -19,6 +20,7 @@ var tabList = [
]; ];
Page({ Page({
onLoad: function () { onLoad: function () {
this.fetchTemplate();
var userRoles = app.globalData.userRoles; var userRoles = app.globalData.userRoles;
var list = userRoles var list = userRoles
.map(function (item) { return tabList.find(function (menu) { return menu.code === item.menuCode; }); }) .map(function (item) { return tabList.find(function (menu) { return menu.code === item.menuCode; }); })
...@@ -38,6 +40,19 @@ Page({ ...@@ -38,6 +40,19 @@ Page({
data: { data: {
selected: '', selected: '',
list: [], list: [],
tmplIds: [],
},
fetchTemplate: function () {
var _this = this;
fetch_1.systemFetch({
url: '/boss/login/init/data',
method: 'GET',
}).then(function (res) {
console.log(res);
_this.setData({
tmplIds: res.templates,
});
});
}, },
clickHandle: function (e) { clickHandle: function (e) {
console.log('in click', e); console.log('in click', e);
...@@ -45,6 +60,18 @@ Page({ ...@@ -45,6 +60,18 @@ Page({
this.setData({ this.setData({
selected: index, selected: index,
}); });
wx.requestSubscribeMessage({
tmplIds: this.data.tmplIds.map(function (item) { return item.templateId; }),
success: function (res) {
console.log('in success', res);
},
fail: function (res) {
console.log('in fail', res);
},
complete: function (res) {
console.log('in complete', res);
},
});
}, },
}); });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9tZUFuZFJlcG9ydC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImhvbWVBbmRSZXBvcnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFTQSxJQUFNLEdBQUcsR0FBRyxNQUFNLEVBQVUsQ0FBQztBQUM3QixJQUFNLE9BQU8sR0FBVztJQUN0QjtRQUNFLFFBQVEsRUFBRSxrQkFBa0I7UUFDNUI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gICAgIGNvbnNvbGUubG9nKHJlcyk7XG4gICAgICB0aGlzLnNldERhdGEhKHtcbiAgICAgICAgdG1wbElkczogcmVzLnRlbXBsYXRlcyxcbiAgICAgIH0pO1xuICAgIH0pO1xuICB9LFxuICBjbGlja0hhbmRsZShlKSB7XG4gICAgY29uc29sZS5sb2coJ2luIGNsaWNrJywgZSk7XG4gICAgbGV0IHsgcGF0aCwgaW5kZXggfSA9IGUuZGV0YWlsO1xuICAgIC8vIGNvbnNvbGUubG9nKHBhdGgsIGluZGV4KTtcbiAgICAvLyB3eC5zd2l0Y2hUYWIoeyB1cmw6IHBhdGggfSk7XG4gICAgdGhpcy5zZXREYXRhISh7XG4gICAgICBzZWxlY3RlZDogaW5kZXgsXG4gICAgfSk7XG4gICAgd3gucmVxdWVzdFN1YnNjcmliZU1lc3NhZ2Uoe1xuICAgICAgdG1wbElkczogdGhpcy5kYXRhLnRtcGxJZHMubWFwKGl0ZW0gPT4gaXRlbS50ZW1wbGF0ZUlkKSxcbiAgICAgIHN1Y2Nlc3MocmVzKSB7XG4gICAgICAgIGNvbnNvbGUubG9nKCdpbiBzdWNjZXNzJywgcmVzKTtcbiAgICAgIH0sXG4gICAgICBmYWlsKHJlcykge1xuICAgICAgICBjb25zb2xlLmxvZygnaW4gZmFpbCcsIHJlcyk7XG4gICAgICB9LFxuICAgICAgY29tcGxldGUocmVzKSB7XG4gICAgICAgIGNvbnNvbGUubG9nKCdpbiBjb21wbGV0ZScsIHJlcyk7XG4gICAgICB9LFxuICAgIH0pO1xuICB9LFxufSk7XG4iXX0=
\ No newline at end of file \ No newline at end of file
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);
},
});
}, },
}); });
...@@ -24,6 +24,13 @@ var navList = [ ...@@ -24,6 +24,13 @@ var navList = [
reLaunch: false, reLaunch: false,
}, },
{ {
name: '设备运营数据',
icon: '../../../images/ic_shebei@2x.png',
url: '/pages/equipment/equipment',
code: '9106',
reLaunch: false,
},
{
name: '退出登录', name: '退出登录',
icon: '../../../images/btn_Sign_out@2x.png', icon: '../../../images/btn_Sign_out@2x.png',
url: '/pages/index/index?logout=true', url: '/pages/index/index?logout=true',
...@@ -86,4 +93,4 @@ Component({ ...@@ -86,4 +93,4 @@ Component({
}, },
}, },
}); });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVwb3J0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsicmVwb3J0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQ0EseUNBQWdEO0FBRWhELElBQU0sT0FBTyxHQUFHO0lBQ2Q7UUFDRSxJQUFJLEVBQUUsUUFBUTtRQUNkLElBQUksRUFBRSxrQ0FBa0M7UUFDeEMsR0FBRyxFQUFFLG9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bn0pO1xuIl19
\ No newline at end of file \ No newline at end of file
...@@ -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