Browse Source

安检巡查详情新增巡查记录

lisu_V4.3.1
mk 1 year ago
parent
commit
4c91c4fdcd
  1. 412
      subpages/safetyinspection/pages/safetyinspection/safetyinspection.js
  2. 6
      subpages/safetyinspection/pages/safetyinspection/safetyinspection.json
  3. 111
      subpages/safetyinspection/pages/safetyinspection/safetyinspection.wxml
  4. 117
      subpages/safetyinspection/pages/safetyinspection/safetyinspection.wxss
  5. 2
      subpages/securityCheck/pages/securityCheck.wxml

412
subpages/safetyinspection/pages/safetyinspection/safetyinspection.js

@ -1,9 +1,11 @@
// subpages/safetyinspection/pages/safetyinspection/safetyinspection.js // subpages/safetyinspection/pages/safetyinspection/safetyinspection.js
import { $wuxActionSheet } from '../../../../components/dist/index'
const App = getApp() const App = getApp()
import { import {
showRecord,addRecord,inspectionStaff showRecord,addRecord,inspectionStaff
} from "../../../../utils/api" } from "../../../../utils/api"
const config = require('../../../../utils/config') const config = require('../../../../utils/config')
Page({ Page({
/** /**
@ -16,32 +18,24 @@ Page({
pageSize:'20', pageSize:'20',
showList:[], showList:[],
imageUrls:[], imageUrls:[],
remarks:'',//备注 remark:'',//备注
getData:'', reviewTime:'',
gridName:'', checkResultFlag:'',
array: ['合格', '不合格'], // 选择器的数据源 array: ['不合格', '合格'], // 选择器的数据源
result: ['a', 'b', 'c'],
arrlist:[], arrlist:[],
fileList: [], fileList: [],
companyId: '', companyId: '',
showPopup: false, // 控制弹出层显示/隐藏的状态 showPopup: false, // 控制弹出层显示/隐藏的状态
selectedOptions: [], // 选中的复选框项 selectedOptions: [], // 选中的复选框项
selectedNames:[],//显示检察人员 selectedNames:[],//显示检察人员
// 用于存放复选框选择的结果 newContent: '',
result: [],
// 用于存放输入框的值
newPassword: '',
arr:[ arr:[
], ],
arr1:[ checkboxOptions:[],
{value:"1",name:'1.车间一些软件设备出现生锈断裂情况严重'}, checkboxValue:[],
{value:"2",name:'2.还有部分货运车辆已过年检。'}, uploadImageList: [],//图片上传的数组
], imageId:1
arr2:[
{id:"1", data:"2024-05-06 10:20",name:'检察人员',jielun:"不合格",yinhuan:"1.车间一些软件设备出现生锈断裂情况严重",fuchashijian:'2024-01-05',fujian:"1223",beizhu:"qq","dingwei":"山东路"},
{id:"2",data:"2024-05-06 10:20",name:'检察人员',jielun:"不合格",yinhuan:"2.车间一些软件设备出现生锈断裂情况严重",fuchashijian:'2024-01-05',fujian:"1223",beizhu:"qq","dingwei":"山东路"},
]
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
@ -54,7 +48,6 @@ Page({
console.log(App.globalData) console.log(App.globalData)
this.showRecordData() this.showRecordData()
this.addRecordData()
this.toOinspectionStaff() this.toOinspectionStaff()
}, },
@ -98,12 +91,17 @@ Page({
onShareAppMessage() { onShareAppMessage() {
}, },
onChange(event) { onChange(event) {
console.log(event) console.log(event.detail);
this.data.checkboxOptions.forEach((item,index)=>{
if(event.detail.findIndex(item=>item==index) != -1){
item.hazardStatus = 1
}else{
item.hazardStatus = 0
}
})
this.setData({ this.setData({
result: event.detail checkboxValue:event.detail,
}); })
// event.detail 为当前输入的值
console.log(this.data.selectedOptions);
}, },
afterRead(event) { afterRead(event) {
const { const {
@ -135,11 +133,15 @@ Page({
}, },
showRecordData() { showRecordData() {
let parm = { let parm = {
companyId: this.data.companyId id: this.data.companyId
} }
console.log(parm)
showRecord(parm).then(res => { showRecord(parm).then(res => {
console.log(res) if(res.data[0].hiddenDangeList){
let checkboxOptions = res.data[0].hiddenDangeList.filter(item=>item.hazardStatus === 0).map(item=>({hazardDesc:item.hazardDesc,hazardStatus:0}));
this.setData({
checkboxOptions
})
}
this.setData({ this.setData({
showList:res.data showList:res.data
}) })
@ -147,7 +149,6 @@ Page({
}) })
}, },
toOinspectionStaff(){ toOinspectionStaff(){
console.log("我执行了")
let parm = { let parm = {
orgId:this.data.orgid, orgId:this.data.orgid,
      orgType:"agency",       orgType:"agency",
@ -163,18 +164,7 @@ Page({
}) })
}, },
addRecordData(){
let parm=({
})
addRecord(parm).then(res => {
console.log("")
this.setData({
showList:res.data
})
console.log(this.data.showList)
})
},
showPopup() { showPopup() {
this.setData({ showPopup: true }); // 点击按钮显示弹出层 this.setData({ showPopup: true }); // 点击按钮显示弹出层
}, },
@ -203,119 +193,275 @@ Page({
}); // 关闭弹出层 }); // 关闭弹出层
console.log(this.data.selectedNames) console.log(this.data.selectedNames)
}, },
changeNewPassword(e){ changenewContent(e){
console.log("执行了")
this.setData({ this.setData({
newPassword: e.detail.value newContent: e.detail.value
}); });
console.log(this.data.newPassword)
}, },
addAnother() { addAnother() {
// // 获取输入框的值 let newArr = this.data.checkboxOptions.concat({ hazardDesc: this.data.newContent, hazardStatus: 0 });
// const newPassword = this.data.newPassword;
// // 将值添加到arr数组中
// const arr = this.data.arr.concat(newPassword);
// // 更新数据
// this.setData({
// arr: arr,
// // 清空输入框的值
// newPassword: ''
// });
let newValue = this.data.arr1.length + 1; // 根据数组长度确定新值
let newArr = this.data.arr1.concat({ value: newValue.toString(), name: this.data.newPassword });
this.setData({ this.setData({
arr1: newArr, checkboxOptions: newArr,
newPassword: '', // 清空输入框的值 newContent: '', // 清空输入框的值
}); });
console.log('添加后的数组:', this.data.arr1); console.log('添加后的数组:', this.data.checkboxOptions);
}, },
// 删除选中的图片
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)
if (index > -1) {
this.data.uploadImageList.splice(index, 1)
this.setData({
uploadImageList: this.data.uploadImageList
})
}
},
getCurrentDateTime() {
const now = new Date();
const year = now.getFullYear();
const month = (now.getMonth() + 1).toString().padStart(2, '0');
const day = now.getDate().toString().padStart(2, '0');
const hours = now.getHours().toString().padStart(2, '0');
const minutes = now.getMinutes().toString().padStart(2, '0');
const seconds = now.getSeconds().toString().padStart(2, '0');
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
},
handelClickSave(){
if(this.data.selectedOptions.length === 0){
wx.showToast({
title: '请选择检查人员',
icon:'none'
})
return false
}
if(!this.data.checkResultFlag){
wx.showToast({
title: '请选择检查结论',
icon:'none'
})
return false
}
if(this.data.checkResultFlag == 0 && !this.data.reviewTime){
wx.showToast({
title: '请选择拟复查时间',
icon:'none'
})
return false
}
if(this.data.checkResultFlag == 0 && this.data.hiddenDangeList.length<0){
wx.showToast({
title: '请填写隐患明细',
icon:'none'
})
return false
}
const now = new Date();
const hours = now.getHours().toString().padStart(2, '0');
const minutes = now.getMinutes().toString().padStart(2, '0');
const seconds = now.getSeconds().toString().padStart(2, '0');
let form = {
companyId:this.data.companyId,
checkTime:this.getCurrentDateTime(),
checkPersonsIdList:this.data.selectedOptions,
checkResultFlag:this.data.checkResultFlag,
reviewTime:`${this.data.reviewTime} ${hours}:${minutes}:${seconds}`,
hiddenDangeList:this.data.checkboxOptions,
attachmentUrls:this.data.uploadImageList.map(item=>({fileName:item.originFileName,attachmentUrl:item.ossUrl.url})),
remark:this.data.remark
}
addRecord(form).then(res => {
if(res.code == 0){
wx.showToast({
title: '新增成功',
duration:2000,
success:function(){
setTimeout(()=>{
wx.navigateBack({
delta: 1
})
},2000)
}
})
}
})
console.log(form);
},
chooseImage() {
if (this.data.uploadImageList.length > 3) {
wx.showToast({
title: "最多上传3张照片",
icon: "none"
})
return
}
const _this = this
$wuxActionSheet().showSheet({
buttons: [
{ text: '拍照' },
{ text: '从相册中获取',openType:null, },
],
className: 'dialog-class',
buttonClicked(index) {
if (index === 0) {
wx.chooseMedia({
count: 1,
sizeType: ['original', 'compressed'],
sourceType: ['camera'],
success(res) {
console.log(res);
let deleteLength = _this.data.uploadImageList.length
const uploadImageList = [..._this.data.uploadImageList]
if (res.tempFiles[0].size <= 5 * 1024 * 1024) {
uploadImageList.push({
uploaded: false,
ossUrl: {url:res.tempFiles[0].tempFilePath},
imgUrl: res.tempFiles[0].tempFilePath,
imageId: ++_this.data.imageId,
type:res.tempFiles[0].tempFilePath.substr(res.tempFiles[0].tempFilePath.length -3,3),
format:"image",
name:'wximage'
})
} else {
_this.showToast('图片上限5M,请压缩后重试~')
return false
}
_this.setData({
uploadImageList
})
wx.uploadFile({
url: `${config.BASEURL()}oss/file/uploadvariedfile`,
filePath: res.tempFiles[0].tempFilePath,
name: 'file',
header: {
'Content-type': 'application/json;charset=UTF-8',
'Authorization': wx.getStorageSync('token')
},
success(fileRes) {
if (!JSON.parse(fileRes.data).data) {
_this.showToast('图片上传失败,请重试~')
// 删除
const index = _this.data.uploadImageList.findIndex(item => item.imageId === _this.data.imageId)
if (index > -1) {
_this.data.uploadImageList.splice(index, 1)
_this.setData({
uploadImageList: _this.data.uploadImageList
})
}
} else {
uploadImageList[uploadImageList.length - 1].uploaded = true
uploadImageList[uploadImageList.length - 1].ossUrl = JSON.parse(fileRes.data).data
_this.setData({
uploadImageList
})
}
},
fail(fileRes) {
_this.setData({
uploadImageList: []
})
_this.showToast('图片上传失败,请重试~')
}
})
}
})
} else if (index === 1) {
wx.chooseMedia({
count: 1,
type:'image',
sourceType: ['album'],
success(res) {
console.log(res,'图片上传的res');
let deleteLength = _this.data.uploadImageList.length
const uploadImageList = []
const endIndex = _this.data.uploadImageList.length
res.tempFiles.forEach((item,index) => {
if (item.size <= 5 * 1024 * 1024) {
uploadImageList.push({
uploaded: false,
ossUrl: {url:item.tempFilePath},
imgUrl: item.tempFilePath,
imageId: ++_this.data.imageId,
format:"image",
type:item.tempFilePath.substr(item.tempFilePath.length -3,3),
originFileName:'image' + index + 1
})
} else {
_this.showToast('图片上限5M,请压缩后重试~')
}
})
_this.setData({
uploadImageList: [..._this.data.uploadImageList, ...uploadImageList]
})
uploadImageList.forEach((item, index) => {
return (function (index) {
wx.uploadFile({
url: `${config.BASEURL()}oss/file/uploadvariedfile`,
filePath: res.tempFiles[index].tempFilePath,
name: 'file',
header: {
'Content-type': 'application/json;charset=UTF-8',
'Authorization': wx.getStorageSync('token')
},
success(fileRes) {
if (!JSON.parse(fileRes.data).data) {
_this.showToast('图片上传失败,请重试~')
_this.data.uploadImageList.splice(deleteLength, _this.data.uploadImageList.length - deleteLength)
_this.setData({
uploadImageList: _this.data.uploadImageList
})
} else {
console.log(uploadImageList,'see');
uploadImageList[index].uploaded = true
uploadImageList[index].ossUrl = JSON.parse(fileRes.data).data
_this.data.uploadImageList = _this.data.uploadImageList.slice(0, endIndex)
_this.setData({
uploadImageList: [..._this.data.uploadImageList, ...uploadImageList]
})
}
},
fail(fileRes) {
_this.setData({
uploadImageList: []
})
_this.showToast('图片上传失败,请重试~')
}
})
})(index)
})
}
})
}
return true
},
cancelText: '取消',
cancel() { },
destructiveButtonClicked() { },
})
},
pickerChange: function(e) { pickerChange: function(e) {
// 更新当前选中的索引 console.log(e.detail.value);
console.log(e.detail.value),
this.setData({ this.setData({
gridName: this.data.array[e.detail.value] checkResultFlag:e.detail.value,
checkResultFlagName:this.data.array[e.detail.value]
}); });
console.log(this.data.gridName)
// 在这里可以根据选择的值进行相应的逻辑处理
}, },
pickerChange1: function(e) { pickerChange1: function(e) {
// 更新当前选中的索引
console.log(e.detail.value),
this.setData({ this.setData({
getData: e.detail.value reviewTime: e.detail.value
}); });
console.log(this.data.getData)
// 在这里可以根据选择的值进行相应的逻辑处理
}, },
bindRemarkInput(e){ bindRemarkInput(e){
this.setData({ this.setData({
remarks: e.detail.value remark: e.detail.value
}); });
console.log(this.data.remarks) console.log(this.data.remark)
}, },
chooseImage() {
const that = this;
wx.chooseMedia({
count: 1,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success(res) {
console.log(res)
const tempFilePaths = res;
console.log(tempFilePaths);
const imageUrls = [...that.data.imageUrls]
if (that.data.imageUrls) {
that.setData({
imageUrls: that.data.imageUrls.concat(tempFilePaths)
})
wx.uploadFile({
url: `${config.BASEURL()}oss/file/uploadvariedfile`,
filePath: res.tempFiles[0].tempFilePath,
name: 'file',
header: {
'Content-type': 'application/json;charset=UTF-8',
'Authorization': wx.getStorageSync('token')
},
success(fileRes) {
if (!JSON.parse(fileRes.data).data) {
that.showToast('图片上传失败,请重试~')
// 删除
const index = that.data.imageUrls.findIndex(item => item.imageId === that.data.imageId)
if (index > -1) {
that.data.imageUrls.splice(index, 1)
that.setData({
imageUrls: that.data.imageUrls
})
}
} else {
imageUrls[imageUrls.length - 1].uploaded = true
imageUrls[imageUrls.length - 1].ossUrl = JSON.parse(fileRes.data).data
that.setData({
imageUrls
})
}
},
fail(fileRes) {
that.setData({
imageUrls: []
})
that.showToast('图片上传失败,请重试~')
}
})
}else{
}
// 将选定的图片显示在页面上
// this.setData({
// imageUrl: tempFilePaths[0]
// });
}
})
},
}) })

6
subpages/safetyinspection/pages/safetyinspection/safetyinspection.json

@ -6,6 +6,10 @@
"van-checkbox-group": "@vant/weapp/checkbox-group/index", "van-checkbox-group": "@vant/weapp/checkbox-group/index",
"van-uploader": "@vant/weapp/uploader/index", "van-uploader": "@vant/weapp/uploader/index",
"van-popup": "@vant/weapp/popup/index", "van-popup": "@vant/weapp/popup/index",
"van-picker": "@vant/weapp/picker/index" "van-picker": "@vant/weapp/picker/index",
"wux-actionsheet": "../../../../components/dist/actionsheet/index"
},
"permissions": {
"scope.record": true
} }
} }

111
subpages/safetyinspection/pages/safetyinspection/safetyinspection.wxml

@ -1,30 +1,28 @@
<!--subpages/safetyinspection/pages/safetyinspection/safetyinspection.wxml--> <!--subpages/safetyinspection/pages/safetyinspection/safetyinspection.wxml-->
<view class="from"> <view class="form_add">
<view class="prosecutors" bind:tap="showPopup"> <view class="prosecutors" bind:tap="showPopup">
<view> <view>
<text class="prosecutors_req">*</text> <text class="prosecutors_req">*</text>
<text class="prosecutors_pre">检查人员</text> <text class="prosecutors_pre">检查人员</text>
</view>
<text class="prosecutors_name">{{ selectedNames }}</text> <text class="prosecutors_name">{{ selectedNames }}</text>
</view>
<view>
<image src="../../../../images/right.png" class="prosecutors_img"></image> <image src="../../../../images/right.png" class="prosecutors_img"></image>
</view>
</view> </view>
<view class="pitfall"> <view class="pitfall">
<view class="prosecutors"> <view class="prosecutors" style="border-bottom: none;">
<view> <view>
<text class="prosecutors_req">*</text> <text class="prosecutors_req" wx:if="{{checkResultFlag == 0}}">*</text>
<text class="prosecutors_pre">已整改隐患</text> <text class="prosecutors_pre">已整改隐患</text>
</view> </view>
</view> </view>
<view class="checkbox1"> <view class="checkbox1">
<van-checkbox-group value="{{ result }}" bind:change="onChange"> <van-checkbox-group value="{{checkboxValue}}" bind:change="onChange" wx:if="{{checkboxOptions}}" >
<van-checkbox custom-class="group" name="{{item.value}}" wx:for="{{arr1}}">{{item.name}}</van-checkbox> <van-checkbox custom-class="group" name="{{index}}" wx:for="{{checkboxOptions}}">{{item.hazardDesc}}</van-checkbox>
</van-checkbox-group> </van-checkbox-group>
</view> </view>
<view class="input1"> <view class="input1">
<input bindinput="changeNewPassword" type="text" placeholder=" 请输入" /> <input bindinput="changenewContent" value="{{newContent}}" type="text" placeholder=" 请输入新的隐患信息" />
</view> </view>
<view class="add" bind:tap="addAnother"> <view class="add" bind:tap="addAnother">
<image src="../../../../images/add.png" class="add_img"></image> <image src="../../../../images/add.png" class="add_img"></image>
@ -35,9 +33,9 @@
<view class="conclusion"> <view class="conclusion">
<text class="prosecutors_req">*</text> <text class="prosecutors_req">*</text>
<text class="prosecutors_pre">检查结论</text> <text class="prosecutors_pre">检查结论</text>
<picker class="prosecutors_name" bindchange="pickerChange" value="{{index}}" range="{{array}}"> <picker class="prosecutors_name" bindchange="pickerChange" value="{{checkResultFlag}}" range="{{array}}">
<view class="{{gridName?'':'gray'}}"> <view class="{{checkResultFlagName?'':'gray'}}">
{{gridName?gridName:'请选择'}} {{checkResultFlagName?checkResultFlagName:'请选择'}}
</view> </view>
</picker> </picker>
</view> </view>
@ -47,12 +45,12 @@
</view> </view>
<view class="prosecutors"> <view class="prosecutors">
<view class="prosecutors_data"> <view class="prosecutors_data">
<text class="prosecutors_req">*</text> <text class="prosecutors_req" wx:if="{{checkResultFlag == 0}}">*</text>
<text class="prosecutors_pre">拟复查时间</text> <text class="prosecutors_pre">拟复查时间</text>
<view> <view>
<picker mode="date" class="prosecutors_name" bindchange="pickerChange1" value="{{data}}"> <picker mode="date" class="prosecutors_name" bindchange="pickerChange1" value="{{reviewTime}}">
<view class="{{getData?'':'gray'}}"> <view class="{{reviewTime?'':'gray'}}">
{{getData?getData:'请选择'}} {{reviewTime?reviewTime:'请选择'}}
</view> </view>
</picker> </picker>
</view> </view>
@ -61,9 +59,26 @@
<image src="../../../../images/right.png" class="prosecutors_img"></image> <image src="../../../../images/right.png" class="prosecutors_img"></image>
</view> </view>
</view> </view>
<view class="image-box">
<view class="{{ uploadImageList.length < 4 ? 'image-list' : uploadImageList.length > 3 && uploadImageList.length < 7 ? 'image-list image-list-2' : uploadImageList.length > 6 && uploadImageList.length < 10 ? 'image-list image-list-3' : 'image-list image-list-4' }}">
<view class=" image-list-label">
<view class="field-text">上传图片</view>
</view>
<view
class="image-item"
wx:for="{{uploadImageList}}"
wx:for-index="index"
wx:for-item="item"
wx:key="imageId">
<image class="issue-image" src="{{item.ossUrl.url}}" />
<image wx:if="{{!item.uploaded}}" class="loading" src="../../../../images/loading.gif" />
<image bindtap="deleteImage" data-imageid="{{item.imageId}}" class="close" wx:else src="../../../../images/icon_close.png" />
</view>
<image wx:if="{{uploadImageList.length < 3}}" src="../../../../images/ig_tianjiatupian@2x.png" bindtap="chooseImage" />
</view>
</view>
<view class="attachment"> <view class="attachment">
<text class="text1">附件</text>
<van-uploader file-list="{{ fileList }}" bind:after-read="afterRead" />
<text class="text1">备注</text> <text class="text1">备注</text>
<view class="textarea1"> <view class="textarea1">
<textarea placeholder-style="color: #C1C1C1;" bindinput="bindRemarkInput" maxlength="100" placeholder-class="gray" placeholder="请输入" /> <textarea placeholder-style="color: #C1C1C1;" bindinput="bindRemarkInput" maxlength="100" placeholder-class="gray" placeholder="请输入" />
@ -71,11 +86,10 @@
</view> </view>
</view> </view>
<view class="from"> <view class="form_record">
<view> <view class="text2">
<text class="text2">巡检记录</text> 巡查记录
</view> </view>
<view style="margin-top: 32rpx;padding: 0 35rpx;">
<view class="logsBox" wx:for="{{showList}}" wx:for-index="index"> <view class="logsBox" wx:for="{{showList}}" wx:for-index="index">
<view class="item-dian {{index!=0?'item-dian1':''}}"> <view class="item-dian {{index!=0?'item-dian1':''}}">
<view class="neidian"></view> <view class="neidian"></view>
@ -87,11 +101,11 @@
<view class="logs-content-left"> <view class="logs-content-left">
<view> <view>
<text class="logs-content-title">检察人员:</text> <text class="logs-content-title">检察人员:</text>
<text class="logs-content-txt">{{item.chekPersons}}</text> <text class="logs-content-txt">{{item.chekPersons||'--'}}</text>
</view> </view>
<view> <view>
<text class="logs-content-title">检查结论:</text> <text class="logs-content-title">检查结论:</text>
<text class="logs-content-txt">{{item.checkResultFlag}}</text> <text class="logs-content-txt">{{item.checkResultFlag == 1?'合格':'不合格'}}</text>
</view> </view>
<view> <view>
<text class="logs-content-title">隐患明细:</text> <text class="logs-content-title">隐患明细:</text>
@ -107,47 +121,31 @@
</view> </view>
<view> <view>
<text class="logs-content-title">附件:</text> <text class="logs-content-title">附件:</text>
<text class="logs-content-txt" wx:for="{{item.attachmentUrls}}">{{item.fileName}}</text> <block wx:if="{{item.attachmentUrls.length > 0}}" >
<text class="logs-content-txt" wx:for="{{item.attachmentUrls}}">{{item.fileName}}</text>
</block>
<text wx:else>--</text>
</view> </view>
<view> <view>
<text class="logs-content-title">备注:</text> <text class="logs-content-title">备注:</text>
<text class="logs-content-txt">{{item.remark}}</text> <text class="logs-content-txt">{{item.remark||'--'}}</text>
</view> </view>
<view> <!-- <view>
<text class="logs-content-title">巡查定位:</text> <text class="logs-content-title">巡查定位:</text>
<text class="logs-content-txt">--</text> <text class="logs-content-txt">--</text>
<text class="logs-content-txt">{{item.name}}</text> <text class="logs-content-txt">{{item.name}}</text>
</view> </view> -->
</view>
</view> </view>
</view> </view>
</view> </view>
<view class="footer"> </view>
<view class="btn"> <view style="height: 100rpx; width: 100%;"></view>
<view class="footer">
<view class="btn" bind:tap="handelClickSave">
<text class="btn_text">提交</text> <text class="btn_text">提交</text>
</view> </view>
</view> </view>
<view class="image-box">
<view class="field-text">上传图片</view>
<view wx:for="{{imageUrls}}">
<image wx:if="{{imageUrls}}" src="{{item.tempFilePath}}" mode="aspectFit" style="width: 200rpx; height: 300px;"></image>
</view>
<image src="../../../../images/addphoto.png" bindtap="chooseImage" />
</view>
<!-- <view class="{{ uploadImageList.length < 4 ? 'image-list' : uploadImageList.length > 3 && uploadImageList.length < 7 ? 'image-list image-list-2' : uploadImageList.length > 6 && uploadImageList.length < 10 ? 'image-list image-list-3' : 'image-list image-list-4' }}">
<view class=" image-list-label">
<view class="field-text">上传图片</view>
</view>
<view class="image-item" wx:for="{{uploadImageList}}" wx:for-index="index" wx:for-item="item" wx:key="imageId">
<image class="issue-image" src="{{item.ossUrl.url}}" />
<image wx:if="{{!item.uploaded}}" class="loading" src="../../../images/loading.gif" />
<image bindtap="deleteImage" data-imageid="{{item.imageId}}" class="close" wx:else src="../../../images/sc.png" />
</view>
<image src="../../../../images/addphoto.png" bindtap="chooseImage" />
</view> -->
</view>
<van-popup show="{{ showPopup }}" closeable close-icon="close" position="bottom" custom-style="height: 50%" bind:close="onClose"> <van-popup show="{{ showPopup }}" closeable close-icon="close" position="bottom" custom-style="height: 50%" bind:close="onClose">
<view class="popup-content"> <view class="popup-content">
<van-checkbox-group value="{{selectedOptions}}" bind:change="onChange1"> <van-checkbox-group value="{{selectedOptions}}" bind:change="onChange1">
@ -155,4 +153,5 @@
</van-checkbox-group> </van-checkbox-group>
<button bindtap="confirmSelection">确定</button> <button bindtap="confirmSelection">确定</button>
</view> </view>
</van-popup> </van-popup>
<wux-actionsheet id="wux-actionsheet" />

117
subpages/safetyinspection/pages/safetyinspection/safetyinspection.wxss

@ -1,26 +1,40 @@
page { page {
width: 100%; width: 100%;
min-height: 100vh; min-height: calc(100vh - 100rpx);
overflow-y: auto; overflow-y: auto;
background-color: #f7f7f7; background-color: #f7f7f7;
padding: 0 30rpx;
box-sizing: border-box;
}
.form_add{
width: 100%;
height: 100%;
padding:29rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
border-radius: 15rpx;
background-color: rgb(255, 255, 255);
margin-top:20rpx ;
} }
.from{ .form_record{
width: 100%; width: 100%;
height: 100%; height: 100%;
padding:29rpx 60rpx;
box-sizing: border-box;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
border-radius: 15rpx; border-radius: 15rpx;
background-color: rgb(255, 255, 255); background-color: rgb(255, 255, 255);
margin: 30rpx; margin-top:20rpx ;
} }
.prosecutors{ .prosecutors{
display: flex; display: flex;
flex-direction:row; flex-direction:row;
align-items: center; align-items: center;
margin: 20rpx; height: 100rpx;
justify-content: space-between; justify-content: space-between;
height: 50rpx;
border-bottom: 1px solid #EAEAEA; border-bottom: 1px solid #EAEAEA;
} }
.conclusion{ .conclusion{
@ -32,33 +46,34 @@ page {
margin: 5rpx margin: 5rpx
} }
.prosecutors_pre{ .prosecutors_pre{
width: 125rpx; /* width: 125rpx; */
height: 30rpx; height: 50rpx;
overflow-wrap: break-word; overflow-wrap: break-word;
color: rgba(102,102,102,1); color: rgba(102,102,102,1);
font-size:32rpx; font-size:32rpx;
font-weight: normal; font-weight: normal;
text-align: left; text-align: left;
white-space: nowrap; white-space: nowrap;
line-height: 42rpx; line-height: 50rpx;
margin-left: 6rpx; margin-left: 6rpx;
} }
.prosecutors_name{ .prosecutors_name{
width: 150px; width: 400rpx;
height: 30rpx; height: 50rpx;
text-emphasis: none;
overflow: hidden;
overflow-wrap: break-word; overflow-wrap: break-word;
color: rgba(51,51,51,1); color: rgba(51,51,51,1);
font-size: 32rpx; font-size: 32rpx;
font-weight: normal; font-weight: normal;
text-align: left; text-align: left;
white-space: nowrap; white-space: nowrap;
line-height: 42rpx; line-height: 50rpx;
margin-left: 60rpx; margin-left: 30rpx;
} }
.prosecutors_img{ .prosecutors_img{
width: 40rpx; width: 40rpx;
height: 30rpx; height: 30rpx;
margin-right: 30rpx;
} }
.prosecutors_top{ .prosecutors_top{
display: flex; display: flex;
@ -125,7 +140,6 @@ page {
} }
.text2{ .text2{
width: 133rpx; width: 133rpx;
height: 32rpx;
overflow-wrap: break-word; overflow-wrap: break-word;
color: rgba(51,51,51,1); color: rgba(51,51,51,1);
font-size: 34rpx; font-size: 34rpx;
@ -133,8 +147,7 @@ page {
font-weight: 700; font-weight: 700;
text-align: left; text-align: left;
white-space: nowrap; white-space: nowrap;
line-height: 52rpx; margin-bottom: 29rpx;
margin: 31rpx 0 0 29rpx;
} }
.logsBox { .logsBox {
border-left: 3rpx solid #DADEE5; border-left: 3rpx solid #DADEE5;
@ -310,11 +323,14 @@ margin-bottom: 20rpx;
} }
.footer{ .footer{
width: 700rpx; width: 100%;
height: 100rpx; height: 100rpx;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
position: fixed;
bottom: 0;
left: 0;
} }
.image-box { .image-box {
width: 100%; width: 100%;
@ -328,4 +344,71 @@ margin-bottom: 20rpx;
} }
.group{ .group{
margin-bottom: 20rpx; margin-bottom: 20rpx;
}
.image-box {
width: 100%;
height: auto;
border-radius: 16rpx;
background: #fff;
margin-top: 20rpx;
box-sizing: border-box;
padding: 34rpx 24rpx;
position: relative;
/* display: flex;
align-items: center; */
}
.image-box .image-list-label {
position: absolute;
top: 35rpx;
}
.image-box .add-icon {
/* margin-top: 40rpx; */
width: 80rpx;
height: 80rpx;
margin-right: 40rpx;
}
.image-list {
width: 100%;
display: grid;
grid-template-columns: 214rpx 214rpx 214rpx;
grid-template-rows: 214rpx;
grid-gap: 17rpx;
height: 188rpx;
margin-top:80rpx ;
}
.image-list-2 {
height: 428rpx !important;
}
.image-list-3 {
height: 642rpx !important;
}
.image-list-4 {
height: 856rpx !important;
}
.image-list .image-item {
width: 100%;
height: 100%;
position: relative;
}
.image-list image {
/* width: 100%; */
/* height: 100%; */
width: 180rpx;
height: 180rpx;
object-fit: cover;
border-radius: 8rpx;
}
.image-list .image-item .loading {
position: absolute;
left: 25%;
top: 25%;
width: 50%;
height: 50%;
}
.image-list .image-item .close {
position: absolute;
top: -10rpx;
right: -10rpx;
width: 40rpx;
height: 40rpx;
} }

2
subpages/securityCheck/pages/securityCheck.wxml

@ -30,7 +30,7 @@
<scroll-view scroll-y="{{true}}" scroll-into-view="scrollToHere" wx:if="{{qualifiedStyle}}" style="width: 100%; height: 90vh;"> <scroll-view scroll-y="{{true}}" scroll-into-view="scrollToHere" wx:if="{{qualifiedStyle}}" style="width: 100%; height: 90vh;">
<view class="list_1" wx:for="{{flag1Array}}" bind:tap="toDetails"> <view class="list_1" wx:for="{{flag1Array}}" data-resiId="{{item.id}}" bind:tap="toDetails">
<view class="section_1-0" id="scrollToHere" > <view class="section_1-0" id="scrollToHere" >
<view class="title">{{item.name}}</view> <view class="title">{{item.name}}</view>
<view class="title_mall">检查时间: {{item.orderDate}}</view> <view class="title_mall">检查时间: {{item.orderDate}}</view>

Loading…
Cancel
Save