Browse Source

案件巡查

v4.3.1_xiaowang_bug
是小王呀\24601 1 year ago
parent
commit
373e858e5a
  1. 2
      pages/index/index.wxml
  2. 46
      pages/index/index.wxss
  3. 44
      subpages/safetyinspection/pages/safetyinspection/safetyinspection.js
  4. 22
      subpages/safetyinspection/pages/safetyinspection/safetyinspection.wxml
  5. 2
      subpages/securityCheck/pages/securityCheck.js

2
pages/index/index.wxml

@ -144,7 +144,7 @@
<text class="Information_test2">{{item.readFlag != '1'?'未读':'已读'}}</text> <text class="Information_test2">{{item.readFlag != '1'?'未读':'已读'}}</text>
</view> </view>
<view class="Information_two"> <view class="Information_two">
<text class="Information_test3">{{item.msgType}}</text> <text class="Information_test3">{{item.typeName}}</text>
<text class="Information_test4">{{item.createdTime}}</text> <text class="Information_test4">{{item.createdTime}}</text>
</view> </view>
</view> </view>

46
pages/index/index.wxss

@ -5,7 +5,7 @@ page {
height: auto; height: auto;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background-color: black; background-color: #f7f7f7;
/* z-index: -9999; */ /* z-index: -9999; */
} }
.header { .header {
@ -281,7 +281,7 @@ page {
height: 412rpx; height: 412rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin: 20rpx 0 0 30rpx; margin: 20rpx 24rpx 0 24rpx;
} }
.text-wrapper_1 { .text-wrapper_1 {
background-color: rgba(255,255,255,1.000000); background-color: rgba(255,255,255,1.000000);
@ -305,12 +305,13 @@ page {
margin: 30rpx 0 0 29rpx; margin: 30rpx 0 0 29rpx;
} }
.block_1 { .block_1 {
width: 650rpx; width: 700rpx;
height: 290rpx; height: 290rpx;
flex-direction: row; flex-direction: row;
display: flex; display: flex;
justify-content: space-between; justify-content: center;
margin: 2rpx 0 30rpx 30rpx; margin-top: 5rpx;
} }
.group_3 { .group_3 {
width: 309rpx; width: 309rpx;
@ -319,6 +320,7 @@ page {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
position: relative; position: relative;
margin-right: 30rpx;
} }
.image_house{ .image_house{
@ -406,64 +408,67 @@ page {
height: 80rpx; height: 80rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin: 40rpx 0 0 115rpx; margin-top: 40rpx;
margin-left: 80rpx;
} }
.text_12 { .text_12 {
width: 114rpx; width: 180rpx;
height: 41rpx; height: 41rpx;
overflow-wrap: break-word; overflow-wrap: break-word;
color: rgba(58,128,231,1); color: rgba(58,128,231,1);
font-size: 44rpx; font-size: 44rpx;
font-family: PingFang-SC-Heavy; font-family: PingFang-SC-Heavy;
font-weight: 900; font-weight: 900;
text-align: left; text-align: right;
white-space: nowrap; white-space: nowrap;
line-height: 36rpx; line-height: 36rpx;
} }
.text_13 { .text_13 {
width: 102rpx; width: 180rpx;
height: 25rpx; height: 25rpx;
overflow-wrap: break-word; overflow-wrap: break-word;
color: rgba(102,102,102,1); color: rgba(102,102,102,1);
font-size: 26rpx; font-size: 26rpx;
white-space: nowrap; white-space: nowrap;
line-height: 36rpx; line-height: 36rpx;
margin: 14rpx 0 0 43rpx; text-align: right;margin-top: 20rpx;
} }
.text-group_7 { .text-group_7 {
box-sizing: border-box; box-sizing: border-box;
position: absolute; position: absolute;
bottom: 20rpx; bottom: 78rpx;
right: 75rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin: 0rpx 0rpx 60rpx 50rpx ; margin-left: 80rpx;
margin-bottom: -15rpx;
} }
.text_14 { .text_14 {
width: 113rpx; width: 180rpx;
height: 41rpx; height: 41rpx;
overflow-wrap: break-word; overflow-wrap: break-word;
color: rgba(255,76,28,1); color: rgba(255,76,28,1);
font-size: 44rpx; font-size: 44rpx;
font-family: PingFang-SC-Heavy; font-family: PingFang-SC-Heavy;
font-weight: 900; font-weight: 900;
text-align: left; text-align: right;
white-space: nowrap; white-space: nowrap;
line-height: 36rpx; line-height: 36rpx;
margin-left: 67rpx;
} }
.text_15 { .text_15 {
box-sizing: border-box; box-sizing: border-box;
width: 180rpx; width: 180rpx;
height: 25rpx; height: 41rpx;
overflow-wrap: break-word; overflow-wrap: break-word;
color: rgba(102,102,102,1); color: rgba(102,102,102,1);
font-size: 26rpx; font-size: 26rpx;
white-space: nowrap; white-space: nowrap;
line-height: 36rpx; line-height: 36rpx;
margin-top: 14rpx; text-align: right;
margin-left: 35rpx; margin-top: 15rpx;
} }
@ -738,6 +743,7 @@ page {
margin: 20rpx 0 0 30rpx; margin: 20rpx 0 0 30rpx;
border-radius: 20rpx; border-radius: 20rpx;
overflow: hidden; overflow: hidden;
margin: 20rpx 24rpx 0 24rpx;
} }
.hd_news{ .hd_news{
display: flex; display: flex;
@ -876,8 +882,6 @@ line-height: 40rpx;
.new_h2{ .new_h2{
margin-top: 30rpx; margin-top: 30rpx;
margin-left: 30rpx; margin-left: 30rpx;
font-family: PingFang SC;
font-weight: bold;
font-size: 34rpx; font-size: 34rpx;
color: #333333; color: #333333;
line-height: 52rpx; line-height: 52rpx;

44
subpages/safetyinspection/pages/safetyinspection/safetyinspection.js

@ -49,12 +49,12 @@ Page({
onLoad(options) { onLoad(options) {
if(options){ if(options){
this.setData({ this.setData({
companyId: options.resiId, companyId: options.resiId,
orgid:App.globalData.user.agencyId, orgid:App.globalData.user.agencyId,
checkResultFlagRouter:options.flag, checkResultFlagRouter:options.flag,
}) })
console.log(options.resiId,App.globalData.user.agencyId,options.flag)
} }
this.showRecordData() this.showRecordData()
this.toOinspectionStaff() this.toOinspectionStaff()
@ -112,9 +112,7 @@ Page({
}).then(({ }).then(({
data data
}) => { }) => {
console.log(data)
var firstItem = data.list[0]; var firstItem = data.list[0];
console.log(firstItem)
this.setData({ this.setData({
reviewAddress:firstItem.address, reviewAddress:firstItem.address,
companyList: data.list, companyList: data.list,
@ -129,7 +127,6 @@ Page({
this.setData({ this.setData({
addHiddenDangeList: addHiddenDangeList addHiddenDangeList: addHiddenDangeList
}); });
console.log(this.data.addHiddenDangeList);
}, },
handelShowTime(){ handelShowTime(){
this.setData({ this.setData({
@ -137,16 +134,13 @@ Page({
}) })
}, },
onChange(event) { onChange(event) {
console.log(event.detail);
this.data.checkboxOptions.forEach((item,index)=>{ this.data.checkboxOptions.forEach((item,index)=>{
if(event.detail.findIndex(item=>item==index) != -1){ if(event.detail.findIndex(item=>item==index) != -1){
console.log("我被选中了")
item.hazardStatus = 0 item.hazardStatus = 0
}else{ }else{
item.hazardStatus = 1 item.hazardStatus = 1
} }
}) })
console.log(this.data.checkboxOptions)
this.setData({ this.setData({
checkboxValue:event.detail, checkboxValue:event.detail,
}) })
@ -163,7 +157,6 @@ Page({
const { const {
file file
} = event.detail; } = event.detail;
console.log(file)
// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式 // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
wx.uploadFile({ wx.uploadFile({
url: 'https://example.weixin.qq.com/upload', // 仅为示例,非真实的接口地址 url: 'https://example.weixin.qq.com/upload', // 仅为示例,非真实的接口地址
@ -198,6 +191,7 @@ Page({
item.hiddenDangeList0 = []; item.hiddenDangeList0 = [];
item.hiddenDangeList1 = []; item.hiddenDangeList1 = [];
item.hiddenDangeList2 = []; item.hiddenDangeList2 = [];
item.hiddenDangeList3 = [];
item.hiddenDangeList.forEach(itemC => { item.hiddenDangeList.forEach(itemC => {
if (itemC.hazardStatus === 0) { if (itemC.hazardStatus === 0) {
item.hiddenDangeList0.push(itemC); item.hiddenDangeList0.push(itemC);
@ -219,8 +213,6 @@ Page({
this.setData({ this.setData({
showList:res.data showList:res.data
}) })
console.log(this.data.checkboxOptions)
console.log(this.data.showList,'seeeeee')
}) })
}, },
toOinspectionStaff(){ toOinspectionStaff(){
@ -231,7 +223,6 @@ Page({
      pageSize:100       pageSize:100
} }
inspectionStaff(parm).then(res=>{ inspectionStaff(parm).then(res=>{
console.log(res.data.staffList)
this.setData({ this.setData({
arr:res.data.staffList arr:res.data.staffList
}) })
@ -256,26 +247,18 @@ Page({
}); // 关闭弹出层 }); // 关闭弹出层
}, },
onChange1(event) { onChange1(event) {
console.log(event)
this.setData({ this.setData({
selectedOptions: event.detail selectedOptions: event.detail
}); });
console.log(this.data.selectedOptions)
}, },
confirmSelection() { confirmSelection() {
// 点击确定按钮后触发,处理选中的复选框项 // 点击确定按钮后触发,处理选中的复选框项
console.log("选中的项:", this.data.selectedOptions);
console.log(this.data.arr)
console.log(this.data.arr.filter(item => this.data.selectedOptions.includes(item.staffId)).map(item => item.name));
console.log(this.data.arr.filter(item => this.data.selectedOptions.includes(item.value)));
const selectedName = this.data.arr.filter(item => this.data.selectedOptions.includes(item.staffId)).map(item => item.name); const selectedName = this.data.arr.filter(item => this.data.selectedOptions.includes(item.staffId)).map(item => item.name);
console.log("选中的名称:", selectedName);
this.setData({ this.setData({
showPopup: false, showPopup: false,
selectedNames:selectedName selectedNames:selectedName
}); // 关闭弹出层 }); // 关闭弹出层
console.log(this.data.selectedNames)
}, },
changenewContent(e){ changenewContent(e){
this.setData({ this.setData({
@ -285,8 +268,6 @@ Page({
// 删除选中的图片 // 删除选中的图片
deleteImage(e) { deleteImage(e) {
console.log(this.data.uploadImageList,'data中');
console.log(e.currentTarget.dataset.imageid,'图片Id');
const index = this.data.uploadImageList.findIndex(item => item.imageId === e.currentTarget.dataset.imageid) const index = this.data.uploadImageList.findIndex(item => item.imageId === e.currentTarget.dataset.imageid)
if (index > -1) { if (index > -1) {
this.data.uploadImageList.splice(index, 1) this.data.uploadImageList.splice(index, 1)
@ -312,9 +293,6 @@ Page({
}, },
handelClickSave(){ handelClickSave(){
console.log(this.data.checkboxOptions)
console.log(this.data.addHiddenDangeList)
if(this.data.selectedOptions.length === 0){ if(this.data.selectedOptions.length === 0){
wx.showToast({ wx.showToast({
title: '请选择检查人员', title: '请选择检查人员',
@ -343,7 +321,6 @@ handelClickSave(){
}) })
return false return false
} }
console.log(this.data.checkboxOptions)
let hasHazardStatus1 = false; let hasHazardStatus1 = false;
this.data.checkboxOptions.forEach(item => { this.data.checkboxOptions.forEach(item => {
if (item.hazardStatus === 0) { if (item.hazardStatus === 0) {
@ -355,7 +332,6 @@ handelClickSave(){
}); });
if(this.data.checkResultFlag == 0 && !hasHazardStatus1 && this.data.addHiddenDangeList.length<1&&!this.data.newContent){ if(this.data.checkResultFlag == 0 && !hasHazardStatus1 && this.data.addHiddenDangeList.length<1&&!this.data.newContent){
console.log("1111",hasHazardStatus1)
wx.showToast({ wx.showToast({
title: '请填写隐患明细', title: '请填写隐患明细',
icon:'none' icon:'none'
@ -367,7 +343,6 @@ if(this.data.checkResultFlag == 0 && !hasHazardStatus1 && this.data.addHiddenDan
hazardDesc: this.data.newContent, hazardDesc: this.data.newContent,
hazardStatus: 0 hazardStatus: 0
}); });
console.log(newArr)
this.setData({ this.setData({
addHiddenDangeList: newArr, addHiddenDangeList: newArr,
}); });
@ -393,7 +368,6 @@ if(this.data.checkResultFlag == 0 && !hasHazardStatus1 && this.data.addHiddenDan
this.setData({ this.setData({
newContent:null newContent:null
}) })
console.log(form);
addRecord(form).then(res => { addRecord(form).then(res => {
if(res.code == 0){ if(res.code == 0){
wx.showToast({ wx.showToast({
@ -409,7 +383,6 @@ addRecord(form).then(res => {
}) })
} }
}) })
console.log(form);
}, },
addAnother() { addAnother() {
if ( !this.data.newContent) { if ( !this.data.newContent) {
@ -418,9 +391,7 @@ addAnother() {
content: '输入不能为空', content: '输入不能为空',
success (res) { success (res) {
if (res.confirm) { if (res.confirm) {
console.log('用户点击确定')
} else if (res.cancel) { } else if (res.cancel) {
console.log('用户点击取消')
} }
} }
}) })
@ -430,7 +401,6 @@ addAnother() {
addHiddenDangeList: newArr, addHiddenDangeList: newArr,
newContent: '', // 清空输入框的值 newContent: '', // 清空输入框的值
}); });
console.log('添加后的数组:', this.data.addHiddenDangeList);
} }
}, },
@ -456,7 +426,6 @@ chooseImage() {
sizeType: ['original', 'compressed'], sizeType: ['original', 'compressed'],
sourceType: ['camera'], sourceType: ['camera'],
success(res) { success(res) {
console.log(res);
let deleteLength = _this.data.uploadImageList.length let deleteLength = _this.data.uploadImageList.length
const uploadImageList = [..._this.data.uploadImageList] const uploadImageList = [..._this.data.uploadImageList]
if (res.tempFiles[0].size <= 5 * 1024 * 1024) { if (res.tempFiles[0].size <= 5 * 1024 * 1024) {
@ -518,7 +487,6 @@ chooseImage() {
type:'image', type:'image',
sourceType: ['album'], sourceType: ['album'],
success(res) { success(res) {
console.log(res,'图片上传的res');
let deleteLength = _this.data.uploadImageList.length let deleteLength = _this.data.uploadImageList.length
const uploadImageList = [] const uploadImageList = []
const endIndex = _this.data.uploadImageList.length const endIndex = _this.data.uploadImageList.length
@ -558,7 +526,6 @@ chooseImage() {
uploadImageList: _this.data.uploadImageList uploadImageList: _this.data.uploadImageList
}) })
} else { } else {
console.log(uploadImageList,'see');
uploadImageList[index].uploaded = true uploadImageList[index].uploaded = true
uploadImageList[index].ossUrl = JSON.parse(fileRes.data).data uploadImageList[index].ossUrl = JSON.parse(fileRes.data).data
_this.data.uploadImageList = _this.data.uploadImageList.slice(0, endIndex) _this.data.uploadImageList = _this.data.uploadImageList.slice(0, endIndex)
@ -587,12 +554,10 @@ chooseImage() {
}) })
}, },
pickerChange: function(e) { pickerChange: function(e) {
console.log(e.detail.value);
this.setData({ this.setData({
checkResultFlag:e.detail.value, checkResultFlag:e.detail.value,
checkResultFlagName:this.data.array[e.detail.value] checkResultFlagName:this.data.array[e.detail.value]
}); });
console.log(this.data.checkboxOptions)
}, },
pickerChange1: function(e) { pickerChange1: function(e) {
this.setData({ this.setData({
@ -603,8 +568,6 @@ bindRemarkInput(e){
this.setData({ this.setData({
remark: e.detail.value remark: e.detail.value
}); });
console.log(this.data.remark)
console.log(this.data.remark)
}, },
closePopup() { closePopup() {
this.setData({ showPopup: false }); this.setData({ showPopup: false });
@ -619,11 +582,9 @@ onInput(event) {
var minute = ("0" + date.getMinutes()).slice(-2); var minute = ("0" + date.getMinutes()).slice(-2);
var second = ("0" + date.getSeconds()).slice(-2); var second = ("0" + date.getSeconds()).slice(-2);
var formattedDateTime = year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second; var formattedDateTime = year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second;
console.log(formattedDateTime);
this.setData({ this.setData({
getData:formattedDateTime getData:formattedDateTime
}) })
console.log(this.data.getData)
}, },
onConfirm(event) { onConfirm(event) {
@ -632,7 +593,6 @@ onConfirm(event) {
currentDate: value, currentDate: value,
showtime: false showtime: false
}); });
console.log('选中的日期时间:', new Date(value));
}, },
onCancel() { onCancel() {

22
subpages/safetyinspection/pages/safetyinspection/safetyinspection.wxml

@ -1,6 +1,5 @@
<!--subpages/safetyinspection/pages/safetyinspection/safetyinspection.wxml--> <!--subpages/safetyinspection/pages/safetyinspection/safetyinspection.wxml-->
<view class="form_add"> <view wx:if="{{checkResultFlagRouter==0}}" class="form_add">
<view class="prosecutors" bind:tap="showPopup"> <view class="prosecutors" bind:tap="showPopup">
<text class="prosecutors_req">*</text> <text class="prosecutors_req">*</text>
<view class="nes"> <view class="nes">
@ -128,33 +127,32 @@
<text class="logs-content-title">检查结论:</text> <text class="logs-content-title">检查结论:</text>
<text class="logs-content-txt">{{item.checkResultFlag == 1?'合格':'不合格'}}</text> <text class="logs-content-txt">{{item.checkResultFlag == 1?'合格':'不合格'}}</text>
</view> </view>
<view> <view wx:if="{{item.hiddenDangeList0.length}}">
<text class="logs-content-title">{{item.hiddenDangeList2.length ==0?'未整改隐患: ':'隐患明细:'}}</text> <text class="logs-content-title">{{item.hiddenDangeList2.length ==0?'未整改隐患: ':'隐患明细:'}}</text>
<text class="logs-content-txt" name="{{index}}" wx:for="{{item.hiddenDangeList0}}">{{index + 1}}.{{item.hazardDesc}}</text> <text class="logs-content-txt" name="{{index}}" wx:for="{{item.hiddenDangeList0}}">{{index + 1}}.{{item.hazardDesc}}</text>
</view> </view>
<view> <view wx:if="{{item.hiddenDangeList1.length}}">
<text class="logs-content-title" wx:if="{{item.hiddenDangeList2.length == 0}}">已整改隐患:</text> <text class="logs-content-title" wx:if="{{item.hiddenDangeList2.length == 0}}">已整改隐患:</text>
<text class="logs-content-txt" name="{{index}}" wx:for="{{item.hiddenDangeList1}}">{{index + 1}}.{{item.hazardDesc}}</text> <text class="logs-content-txt" name="{{index}}" wx:for="{{item.hiddenDangeList1}}">{{index + 1}}.{{item.hazardDesc}}</text>
</view> </view>
<view wx:if="{{item.hiddenDangeList2.length != 0}}"> <view wx:if="{{item.hiddenDangeList2.length}}">
<text class="logs-content-title">整改要求:</text> <text class="logs-content-title">整改要求:</text>
<text class="logs-content-txt" wx:for="{{item.hiddenDangeList2}}">{{index + 1}}.{{item.hazardDesc}}</text> <text class="logs-content-txt" wx:for="{{item.hiddenDangeList2}}">{{index + 1}}.{{item.hazardDesc}}</text>
</view> </view>
<view > <view wx:if="{{item.reviewTime}}" >
<text class="logs-content-title">拟复查时间:</text> <text class="logs-content-title" wx:if="{{item.reviewTime}}">拟复查时间:</text>
<text class="logs-content-txt">{{item.reviewTime || '--'}}</text> <text class="logs-content-txt">{{item.reviewTime}}</text>
</view> </view>
<view> <view>
<text class="logs-content-title">附件:</text> <text class="logs-content-title" wx:if="{{item.attachmentUrls}}">附件:</text>
<block wx:if="{{item.attachmentUrls.length > 0}}" > <block wx:if="{{item.attachmentUrls.length > 0}}" >
<text class="logs-content-txt" wx:for="{{item.attachmentUrls}}">{{item.fileName}}</text> <text class="logs-content-txt" wx:for="{{item.attachmentUrls}}">{{item.fileName}}</text>
</block> </block>
<text wx:else>--</text>
</view> </view>
<view > <view >
<text class="logs-content-title">备注:</text> <text class="logs-content-title" wx:if="{{item.remark}}">备注:</text>
<text class="logs-content-txt">{{item.remark||'--'}}</text> <text class="logs-content-txt" wx:if="{{item.remark}}">{{item.remark}}</text>
</view> </view>
<view > <view >
<text class="logs-content-title">巡查定位:</text> <text class="logs-content-title">巡查定位:</text>

2
subpages/securityCheck/pages/securityCheck.js

@ -65,8 +65,6 @@ getList() {
} }
}); });
console.log(data.list); console.log(data.list);
if (this.data.flag0Array.length === 0) { if (this.data.flag0Array.length === 0) {
this.setData({ this.setData({
loadMoreVisible: false, loadMoreVisible: false,

Loading…
Cancel
Save