From 75bd3e8d9d06e53ef5fb41b5f4c022e2d24a500c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=98=AF=E5=B0=8F=E7=8E=8B=E5=91=80=5C24601?=
<819653817@qq.com>
Date: Fri, 10 May 2024 18:30:25 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=95=B0=E6=8D=AE=E8=BF=94?=
=?UTF-8?q?=E5=9B=9E?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../dissatisfied/demandCheck/demandCheck.wxml | 2 +-
.../safetyinspection/safetyinspection.js | 110 +++++++++++++++++-
.../safetyinspection/safetyinspection.wxml | 65 ++++++-----
.../safetyinspection/safetyinspection.wxss | 46 +++++++-
4 files changed, 191 insertions(+), 32 deletions(-)
diff --git a/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.wxml b/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.wxml
index 615ab71..6644358 100644
--- a/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.wxml
+++ b/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.wxml
@@ -10,7 +10,7 @@
所属组织
- {{agencyName?agencyName:'请选择'}}
+ {{agencyName?agencyName:'请选择-'}}
diff --git a/subpages/safetyinspection/pages/safetyinspection/safetyinspection.js b/subpages/safetyinspection/pages/safetyinspection/safetyinspection.js
index 250546e..73869e6 100644
--- a/subpages/safetyinspection/pages/safetyinspection/safetyinspection.js
+++ b/subpages/safetyinspection/pages/safetyinspection/safetyinspection.js
@@ -1,12 +1,21 @@
// subpages/safetyinspection/pages/safetyinspection/safetyinspection.js
import {
- showRecord
+ showRecord,addRecord,inspectionStaff
} from "../../../../utils/api"
+const config = require('../../../../utils/config')
Page({
/**
* 页面的初始数据
*/
data: {
+ orgid:'',
+ orgType:'',
+ pageNo:'1',
+ pageSize:'20',
+ showList:[],
+ imageUrls:[],
+ remarks:'',//备注
+ getData:'',
gridName:'',
array: ['选项1', '选项2', '选项3', '选项4'], // 选择器的数据源
result: ['a', 'b', 'c'],
@@ -28,6 +37,10 @@ Page({
arr1:[
{value:"1",name:'1.车间一些软件设备出现生锈断裂情况严重'},
{value:"2",name:'2.还有部分货运车辆已过年检。'},
+ ],
+ 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":"山东路"},
]
},
@@ -40,6 +53,7 @@ Page({
companyId: options.resiId
})
this.showRecordData()
+ this.addRecordData()
},
/**
@@ -124,6 +138,20 @@ Page({
console.log(parm)
showRecord(parm).then(res => {
console.log(res)
+ this.setData({
+ showList:res.data
+ })
+ console.log(this.data.showList)
+ })
+ },
+ addRecordData(){
+
+ addRecord(parm).then(res => {
+ console.log("")
+ this.setData({
+ showList:res.data
+ })
+ console.log(this.data.showList)
})
},
showPopup() {
@@ -183,13 +211,91 @@ Page({
pickerChange: function(e) {
// 更新当前选中的索引
console.log(e.detail.value),
- console.log(this.data.array[e.detail.value])
this.setData({
gridName: this.data.array[e.detail.value]
});
console.log(this.data.gridName)
// 在这里可以根据选择的值进行相应的逻辑处理
+},
+pickerChange1: function(e) {
+ // 更新当前选中的索引
+ console.log(e.detail.value),
+ this.setData({
+ getData: e.detail.value
+ });
+ console.log(this.data.getData)
+ // 在这里可以根据选择的值进行相应的逻辑处理
+},
+bindRemarkInput(e){
+ this.setData({
+ remarks: e.detail.value
+ });
+ console.log(this.data.remarks)
+},
+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]
+ // });
+ }
+ })
+
+ },
+
})
\ No newline at end of file
diff --git a/subpages/safetyinspection/pages/safetyinspection/safetyinspection.wxml b/subpages/safetyinspection/pages/safetyinspection/safetyinspection.wxml
index c0062bc..022896c 100644
--- a/subpages/safetyinspection/pages/safetyinspection/safetyinspection.wxml
+++ b/subpages/safetyinspection/pages/safetyinspection/safetyinspection.wxml
@@ -20,7 +20,7 @@
- {{item.name}}
+ {{item.name}}
@@ -50,9 +50,9 @@
*
拟复查时间
-
-
- {{gridName?gridName:'请选择'}}
+
+
+ {{getData?getData:'请选择'}}
@@ -66,50 +66,56 @@
备注
-
+
- 巡检记录
+
+ 巡检记录
+
-
+
- 时间
+ {{item.checkTime}}
检察人员:
- 123
+ {{item.checkPersons}}
检查结论:
- 123
+ {{item.checkResultFlag}}
隐患明细:
- 123
+ {{item.hazardDesc}}
整改要求:
- 123
+ {{item.hazardStatus}}
+
+
+ 拟复查时间:
+ {{item.reviewTime}}
- 附件:
- 123
+ 附件:
+ {{item.fileName}}
备注:
- 123
+ {{item.remark}}
- 整改要求:
- 123
+ 巡查定位:
+ --
@@ -120,15 +126,20 @@
-
+
+
+ 上传图片
+
+
+
+
+
+
+
-
\ No newline at end of file
+
diff --git a/subpages/safetyinspection/pages/safetyinspection/safetyinspection.wxss b/subpages/safetyinspection/pages/safetyinspection/safetyinspection.wxss
index 379bc96..f36e366 100644
--- a/subpages/safetyinspection/pages/safetyinspection/safetyinspection.wxss
+++ b/subpages/safetyinspection/pages/safetyinspection/safetyinspection.wxss
@@ -1,7 +1,6 @@
page {
width: 100%;
min-height: 100vh;
- height: 1450rpx;
overflow-y: auto;
background-color: #f7f7f7;
}
@@ -183,7 +182,7 @@ page {
}
.logs-content-left {
- width: 48%;
+ width: 100%;
}
.logs-content-right {
@@ -283,4 +282,47 @@ page {
display: flex;
flex-direction: row;
+}
+.btn{
+
+ display: flex;
+ margin: 20rpx;
+ background-color: #3974F6;
+ width: 630rpx;
+ height: 86rpx;
+ border-radius: 43rpx;
+ justify-content: center;
+ align-items: center;
+ margin-bottom: 30px;
+}
+.btn_text{
+ width: 80rpx;
+height: 31rpx;
+font-family: PingFang SC;
+font-weight: bold;
+font-size: 32rpx;
+color: #FFFFFF;
+line-height: 60rpx;
+margin-bottom: 20rpx;
+
+}
+.footer{
+ width: 700rpx;
+ height: 100rpx;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+.image-box {
+ width: 100%;
+ height: auto;
+ border-radius: 16rpx;
+ background: #fff;
+ margin-top: 20rpx;
+ box-sizing: border-box;
+ padding: 34rpx 24rpx;
+ position: relative;
+}
+.group1{
+ margin-top: 20rpx;
}
\ No newline at end of file