diff --git a/subpages/securityCheck/pages/securityCheck.js b/subpages/securityCheck/pages/securityCheck.js index 7fb2e33..dcedb25 100644 --- a/subpages/securityCheck/pages/securityCheck.js +++ b/subpages/securityCheck/pages/securityCheck.js @@ -2,11 +2,10 @@ import {securityCheckk} from "../../../utils/api"; Page({ data: { + active:0, pageNo: 1, - pageSize:3, + pageSize:20, id: 0, - waitingCheckStyle: "color: #1974ec;border-bottom: 2px solid blue;", - qualifiedStyle: "", marsi:[ // ], @@ -51,7 +50,9 @@ getList() { pageSize: this.data.pageSize, checkResultFlag: this.data.checkResultFlag }).then(({ data }) => { + data.list.forEach(item => { + console.log(item); if (item.hiddenDangeList) { if (item.hiddenDangeList.findIndex(itemC => itemC.hazardStatus === 2) === -1) { item.status = true; @@ -71,6 +72,7 @@ getList() { nodata: true }); } + console.log(this.data.flag1Array); if (this.data.flag1Array.length === 0) { this.setData({ loadMoreVisible: false, @@ -104,26 +106,26 @@ getList() { }) }, toggleColor(e) { - let value = e.currentTarget.dataset.value; // 获取点击选项的值 - if (value === "1") { - this.setData({ - waitingCheckStyle: "color: blue;border-bottom: 2px solid blue;", - qualifiedStyle: "", - flag0Array: [] - }); - this.data.checkResultFlag = 0 - this.data.pageNo = 1 - this.getList() - } else if (value === "2") { - this.setData({ - waitingCheckStyle: "", - qualifiedStyle: "color: blue; border-bottom: 2px solid blue;", - flag1Array: [] - }); - this.data.checkResultFlag = 1 - this.data.pageNo = 1 - this.getList() + console.log(e.detail.index); + const let1 =e.detail.index + if (e.detail.index==0) { + this.setData({ + checkResultFlag:let1 + }) + this.getList() + console.log(this.data.checkResultFlag); } + else{ + this.setData({ + checkResultFlag:let1 + }) + this.getList() + console.log(this.data.checkResultFlag); + } + this.setData({ + active:let1 + }) + }, qualifed(){ wx.navigateTo({ diff --git a/subpages/securityCheck/pages/securityCheck.json b/subpages/securityCheck/pages/securityCheck.json index 6a88a8d..af119c3 100644 --- a/subpages/securityCheck/pages/securityCheck.json +++ b/subpages/securityCheck/pages/securityCheck.json @@ -1,4 +1,7 @@ { - "usingComponents": {}, + "usingComponents": { + "van-tab": "@vant/weapp/tab/index", + "van-tabs": "@vant/weapp/tabs/index" + }, "navigationBarTitleText": "安检巡查" } \ No newline at end of file diff --git a/subpages/securityCheck/pages/securityCheck.wxml b/subpages/securityCheck/pages/securityCheck.wxml index ee3388a..3c211a7 100644 --- a/subpages/securityCheck/pages/securityCheck.wxml +++ b/subpages/securityCheck/pages/securityCheck.wxml @@ -1,67 +1,66 @@ - - - - 待复核 - - - 已合格 - - - - - - - - - {{item.name}} - 检查时间: {{item.orderDate}} - 检查人员: {{item.checkPersons}} - {{item.status?'未整改隐患':'隐患明细'}}: - {{index+1}}.{{item.hazardDesc}} - - - - 整改要求:{{item.hazardDesc}} - - - - - 已整改隐患:{{indexC+1}}.{{item.hazardDesc}} - - - 拟复查时间: {{item.reviewTime}} + + + + + + + + + {{item.name}} + 检查时间: {{item.orderDate}} + 检查人员: {{item.checkPersons}} + {{item.status?'未整改隐患':'隐患明细'}}: + {{index+1}}.{{item.hazardDesc}} + + + + 整改要求:{{item.hazardDesc}} + + + + + 已整改隐患:{{indexC+1}}.{{item.hazardDesc}} + + + 拟复查时间: {{item.reviewTime}} + + + + + + + - - - - - - - + + + + + + + {{item.name}} + 检查时间: {{item.createdTime}} + 检查人员: {{item.checkPersons}} + 检查结论: 合格 - - - - {{item.name}} - 检查时间: {{item.createdTime}} - 检查人员: {{item.checkPersons}} - 检查结论: 合格 - 合格时间: {{item.orderDate}} + - - - - - - + + + + + - - + + + + + + - + + \ No newline at end of file diff --git a/subpages/securityCheck/pages/securityCheck.wxss b/subpages/securityCheck/pages/securityCheck.wxss index 259b177..f751738 100644 --- a/subpages/securityCheck/pages/securityCheck.wxss +++ b/subpages/securityCheck/pages/securityCheck.wxss @@ -10,15 +10,10 @@ page{ flex-direction: column; } .search{ - height: 110rpx; width: 100%; - padding:0 22rpx; box-sizing: border-box; - background-color: #fff; - display: flex; align-items: center; /* justify-content: space-between; */ - padding-top: 20rpx; box-sizing: border-box; justify-content: center; } @@ -28,8 +23,6 @@ page{ margin-right: 60rpx; } .row1{ - display: flex; - flex-direction: row; font-size: 30rpx } .box_2 { @@ -53,11 +46,11 @@ page{ overflow-y: auto; } */ .section_5 { - width: 100%; height: 1395rpx; display: flex; flex-direction: column; overflow: hidden; + padding: 20rpx; } .content_1{ display: flex; @@ -108,19 +101,20 @@ page{ margin-left: 332rpx; } .list_1 { - /* width: 710rpx; */ + width: 700rpx; /* height: 603rpx; */ /* display: flex; */ /* flex-direction: column; */ /* justify-content: space-between; */ - margin: 20rpx 0 0 20rpx; + display: flex; /* width: 100%; */ + margin-bottom: 20rpx; } .section_1-0 { background-color: rgba(255,255,255,1.000000); border-radius: 20rpx; /* height: 410rpx; */ - /* width: 710rpx; */ + width: 710rpx; display: flex; flex-direction: column; padding-bottom: 10px; @@ -186,6 +180,7 @@ margin-left: 30rpx; .image-wrapper{ width: 190rpx; height: 190rpx; + }