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"; import {securityCheckk} from "../../../utils/api";
Page({ Page({
data: { data: {
active:0,
pageNo: 1, pageNo: 1,
pageSize:3, pageSize:20,
id: 0, id: 0,
waitingCheckStyle: "color: #1974ec;border-bottom: 2px solid blue;",
qualifiedStyle: "",
marsi:[ marsi:[
// //
], ],
@ -51,7 +50,9 @@ getList() {
pageSize: this.data.pageSize, pageSize: this.data.pageSize,
checkResultFlag: this.data.checkResultFlag checkResultFlag: this.data.checkResultFlag
}).then(({ data }) => { }).then(({ data }) => {
data.list.forEach(item => { data.list.forEach(item => {
console.log(item);
if (item.hiddenDangeList) { if (item.hiddenDangeList) {
if (item.hiddenDangeList.findIndex(itemC => itemC.hazardStatus === 2) === -1) { if (item.hiddenDangeList.findIndex(itemC => itemC.hazardStatus === 2) === -1) {
item.status = true; item.status = true;
@ -71,6 +72,7 @@ getList() {
nodata: true nodata: true
}); });
} }
console.log(this.data.flag1Array);
if (this.data.flag1Array.length === 0) { if (this.data.flag1Array.length === 0) {
this.setData({ this.setData({
loadMoreVisible: false, loadMoreVisible: false,
@ -104,26 +106,26 @@ getList() {
}) })
}, },
toggleColor(e) { toggleColor(e) {
let value = e.currentTarget.dataset.value; // 获取点击选项的值 console.log(e.detail.index);
if (value === "1") { const let1 =e.detail.index
this.setData({ if (e.detail.index==0) {
waitingCheckStyle: "color: blue;border-bottom: 2px solid blue;", this.setData({
qualifiedStyle: "", checkResultFlag:let1
flag0Array: [] })
}); this.getList()
this.data.checkResultFlag = 0 console.log(this.data.checkResultFlag);
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()
} }
else{
this.setData({
checkResultFlag:let1
})
this.getList()
console.log(this.data.checkResultFlag);
}
this.setData({
active:let1
})
}, },
qualifed(){ qualifed(){
wx.navigateTo({ 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": "安检巡查" "navigationBarTitleText": "安检巡查"
} }

113
subpages/securityCheck/pages/securityCheck.wxml

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

17
subpages/securityCheck/pages/securityCheck.wxss

@ -10,15 +10,10 @@ page{
flex-direction: column; flex-direction: column;
} }
.search{ .search{
height: 110rpx;
width: 100%; width: 100%;
padding:0 22rpx;
box-sizing: border-box; box-sizing: border-box;
background-color: #fff;
display: flex;
align-items: center; align-items: center;
/* justify-content: space-between; */ /* justify-content: space-between; */
padding-top: 20rpx;
box-sizing: border-box; box-sizing: border-box;
justify-content: center; justify-content: center;
} }
@ -28,8 +23,6 @@ page{
margin-right: 60rpx; margin-right: 60rpx;
} }
.row1{ .row1{
display: flex;
flex-direction: row;
font-size: 30rpx font-size: 30rpx
} }
.box_2 { .box_2 {
@ -53,11 +46,11 @@ page{
overflow-y: auto; overflow-y: auto;
} */ } */
.section_5 { .section_5 {
width: 100%;
height: 1395rpx; height: 1395rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
overflow: hidden; overflow: hidden;
padding: 20rpx;
} }
.content_1{ .content_1{
display: flex; display: flex;
@ -108,19 +101,20 @@ page{
margin-left: 332rpx; margin-left: 332rpx;
} }
.list_1 { .list_1 {
/* width: 710rpx; */ width: 700rpx;
/* height: 603rpx; */ /* height: 603rpx; */
/* display: flex; */ /* display: flex; */
/* flex-direction: column; */ /* flex-direction: column; */
/* justify-content: space-between; */ /* justify-content: space-between; */
margin: 20rpx 0 0 20rpx; display: flex;
/* width: 100%; */ /* width: 100%; */
margin-bottom: 20rpx;
} }
.section_1-0 { .section_1-0 {
background-color: rgba(255,255,255,1.000000); background-color: rgba(255,255,255,1.000000);
border-radius: 20rpx; border-radius: 20rpx;
/* height: 410rpx; */ /* height: 410rpx; */
/* width: 710rpx; */ width: 710rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding-bottom: 10px; padding-bottom: 10px;
@ -186,6 +180,7 @@ margin-left: 30rpx;
.image-wrapper{ .image-wrapper{
width: 190rpx; width: 190rpx;
height: 190rpx; height: 190rpx;
} }

Loading…
Cancel
Save