Browse Source

安检巡防首页样式更改

v4.3.1_xiaowang_bug^2
是小王呀\24601 1 year ago
parent
commit
f7b62e5a7c
  1. 46
      subpages/securityCheck/pages/securityCheck.js
  2. 5
      subpages/securityCheck/pages/securityCheck.json
  3. 113
      subpages/securityCheck/pages/securityCheck.wxml
  4. 17
      subpages/securityCheck/pages/securityCheck.wxss

46
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({

5
subpages/securityCheck/pages/securityCheck.json

@ -1,4 +1,7 @@
{
"usingComponents": {},
"usingComponents": {
"van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index"
},
"navigationBarTitleText": "安检巡查"
}

113
subpages/securityCheck/pages/securityCheck.wxml

@ -1,67 +1,66 @@
<!--subpages/gatherInformation/pages/gatherInformation/gatherInformation.wxml-->
<view class="page">
<view class="search">
<view class="row1">
<view class="filter" bind:tap="toggleColor" data-value="1" style="{{waitingCheckStyle}}">
待复核
</view>
<view class="filter" bind:tap="toggleColor" data-value="2" style="{{qualifiedStyle}}">
已合格
</view></view>
</view>
<view class="">
<view class="section_5">
<scroll-view scroll-y="{{true}}" scroll-into-view="scrollToHere" wx:if="{{waitingCheckStyle}}" style="width: 100%; height: 90vh;"
lower-threshold="{{ lowerThreshold }}" bindscrolltolower="onScrollToLower">
<view class="list_1" wx:for="{{flag0Array}}" bind:tap="toDetails" data-flag="{{item.checkResultFlag}}" data-resiId="{{item.id}}">
<view class="section_1-0" id="scrollToHere">
<view class="title">{{item.name}}</view>
<view class="title_mall">检查时间: {{item.orderDate}}</view>
<view class="title_mall">检查人员: {{item.checkPersons}}</view>
<view class="title_mall">{{item.status?'未整改隐患':'隐患明细'}}:
<text wx:for="{{item.hiddenDangeList0}}" wx:key="index">{{index+1}}.{{item.hazardDesc}}</text>
</view>
<view wx:if="{{!item.status}}">
<view class="title_mall" wx:for="{{item.hiddenDangeList2}}" wx:key="index">
整改要求:{{item.hazardDesc}}
</view>
</view>
<view wx:if="{{item.status && item.hiddenDangeList1.length != 0}}">
<view class="title_mall" >
已整改隐患:<text wx:for="{{item.hiddenDangeList1}}" wx:key="indexC" wx:for-index='indexC'>{{indexC+1}}.{{item.hazardDesc}} </text>
</view>
</view>
<view class="title_mall">拟复查时间: {{item.reviewTime}}</view>
<view class="search">
<view class="row1">
<van-tabs active="{{active}}" bind:change="toggleColor " title-active-color="#3974F6" color="#3974F6">
<van-tab title="待复核">
<view class="section_5">
<scroll-view scroll-y="{{true}}" scroll-into-view="scrollToHere" style="width: 100%; height: 90vh;" lower-threshold="{{ lowerThreshold }}" bindscrolltolower="onScrollToLower">
<view class="list_1" wx:for="{{flag0Array}}" bind:tap="toDetails" data-flag="{{item.checkResultFlag}}" data-resiId="{{item.id}}">
<view class="section_1-0" id="scrollToHere">
<view class="title">{{item.name}}</view>
<view class="title_mall">检查时间: {{item.orderDate}}</view>
<view class="title_mall">检查人员: {{item.checkPersons}}</view>
<view class="title_mall">{{item.status?'未整改隐患':'隐患明细'}}:
<text wx:for="{{item.hiddenDangeList0}}" wx:key="index">{{index+1}}.{{item.hazardDesc}}</text>
</view>
<view wx:if="{{!item.status}}">
<view class="title_mall" wx:for="{{item.hiddenDangeList2}}" wx:key="index">
整改要求:{{item.hazardDesc}}
</view>
</view>
<view wx:if="{{item.status && item.hiddenDangeList1.length != 0}}">
<view class="title_mall">
已整改隐患:<text wx:for="{{item.hiddenDangeList1}}" wx:key="indexC" wx:for-index='indexC'>{{indexC+1}}.{{item.hazardDesc}} </text>
</view>
</view>
<view class="title_mall">拟复查时间: {{item.reviewTime}}</view>
</view>
</view>
<movable-area class="movable-area">
<movable-view class="movable-view" direction="all" x="250" y="300">
<image src="../../../images/xuncha3.png" class="image-wrapper" catchtouchend="handleTap"></image>
</movable-view>
</movable-area>
</scroll-view>
</view>
<movable-area class="movable-area">
<movable-view class="movable-view" direction="all" x="250" y="300">
<image src="../../../images/xuncha3.png" class="image-wrapper" catchtouchend="handleTap"></image>
</movable-view>
</movable-area>
</scroll-view>
</van-tab>
<van-tab title="已合格">
<view class="section_5">
<scroll-view scroll-y="{{true}}" scroll-into-view="scrollToHere"style="width: 100%; height: 90vh;" lower-threshold="{{ lowerThreshold }}" bindscrolltolower="onScrollToLower">
<view class="list_1" wx:for="{{flag1Array}}" data-resiId="{{item.id}}" bind:tap="toDetails" data-flag="{{item.checkResultFlag}}">
<view class="section_1-0" id="scrollToHere">
<view class="title">{{item.name}}</view>
<view class="title_mall">检查时间: {{item.createdTime}}</view>
<view class="title_mall">检查人员: {{item.checkPersons}}</view>
<view class="title_mall">检查结论: 合格</view>
<scroll-view scroll-y="{{true}}" scroll-into-view="scrollToHere" wx:if="{{qualifiedStyle}}" style="width: 100%; height: 90vh;" lower-threshold="{{ lowerThreshold }}" bindscrolltolower="onScrollToLower">
<view class="list_1" wx:for="{{flag1Array}}" data-resiId="{{item.id}}" bind:tap="toDetails" data-flag="{{item.checkResultFlag}}">
<view class="section_1-0" id="scrollToHere" >
<view class="title">{{item.name}}</view>
<view class="title_mall">检查时间: {{item.createdTime}}</view>
<view class="title_mall">检查人员: {{item.checkPersons}}</view>
<view class="title_mall">检查结论: 合格</view>
<view class="title_mall">合格时间: {{item.orderDate}}</view>
</view>
</view>
</view>
<movable-area class="movable-area">
<movable-view class="movable-view" direction="all" x="250" y="300">
<image src="../../../images/xuncha.png" class="image-wrapper" catchtouchend="handleTap"></image>
</movable-view>
</movable-area>
<movable-area class="movable-area">
<movable-view class="movable-view" direction="all" x="250" y="300">
<image src="../../../images/xuncha3.png" class="image-wrapper" catchtouchend="handleTap"></image>
</movable-view>
</movable-area>
</scroll-view>
</scroll-view>
</view>
</van-tab>
</van-tabs>
</view>
</view>
</view>
</view>

17
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;
}

Loading…
Cancel
Save