Browse Source

feat:补充首页轮播图的图片

master
zhaobing’ 1 year ago
parent
commit
3798803511
  1. BIN
      weapp/images/banner1.png
  2. BIN
      weapp/images/banner2.png
  3. 18
      weapp/package/subSystem/subSystem.js
  4. 2
      weapp/package/subSystem/subSystem.wxml
  5. 6
      weapp/pages/home/home.js
  6. 11
      weapp/pages/home/home.wxss

BIN
weapp/images/banner1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 KiB

BIN
weapp/images/banner2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

18
weapp/package/subSystem/subSystem.js

@ -44,6 +44,7 @@ Page({
// level3Count: 0, //严重
// dataList:[],//饼图数据
selectedDate: new Date(), // 设置默认选中的日期为当前日期
questions:0,//故障数量
formatter(day) {
return day;
@ -117,20 +118,7 @@ Page({
wx.hideLoading()
},
//过滤轻微,中度,重度的巡检个数
filterLevelCount: function (list, level) {
return list?.filter(i => {
const content = i?.points?.inspectContent
if (content && content.length) {
for (let key in content) {
if (content.hasOwnProperty(key)) {
const subObject = content[key];
return subObject.level === level
}
}
}
})?.length
},
getSubSystemPatrolAbout: function (options) {
// const userInfo=wx.getStorageSync('userInfo');
let that = this;
@ -199,9 +187,11 @@ Page({
}
}
const data1=Object.entries(levelCounts).map(([name, value]) => ({ name, value }));
const totalValue = data1.reduce((accumulator, item) => accumulator + item.value, 0);
that.setData({
currentRepairCount: res?.filter(i => i.patrolRecordIssueHandles.length > 0).length || 0,
currentPatrolCount: res.length,
questions:totalValue,
formatter: function (e) {
filteredData?.map(i => {
if (moment(i.inspectionTime).format('YYYY-MM-DD') == moment(e.date).format('YYYY-MM-DD')) {

2
weapp/package/subSystem/subSystem.wxml

@ -20,7 +20,7 @@
<text class="fontStyle">故障</text>
</view>
<view class="countStyle">
总数:{{currentPatrolCount}}
总数:{{questions}}
</view>
</view>
<view style="height: 300px"> <ec-canvas id="mychart-dom-pie" canvas-id="mychart-pie" ec="{{ ec }}"></ec-canvas>

6
weapp/pages/home/home.js

@ -78,14 +78,14 @@ Page({
const promiseArr = [];
const that = this;
var data = {
"datas": [
datas: [
{
"id": 1,
"imgurl": "/images/avatar.png"
"imgurl": "/images/banner1.png"
},
{
"id": 2,
"imgurl": "/images/card_bg.png"
"imgurl": "/images/banner2.png"
}
]
};

11
weapp/pages/home/home.wxss

@ -57,14 +57,13 @@
}
.home-swiper {
width: 95%;
/* height: 360rpx; */
}
/* .slide-image {
width: 100%;
height: 100%;
} */
.slide-image {
/* background: 100% 100% */
background-size:cover;
}
.fontStyle {
width: 18px;
height: 17px;

Loading…
Cancel
Save