From afb67831c37f53530c6f486512f19ceefe8cdbe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9DRain=E2=80=9C?= <904416525@qq.com> Date: Fri, 24 May 2024 19:01:59 +0800 Subject: [PATCH 1/2] 1 --- main.js | 4 +- pages.json | 13 +- .../exam/examresult/examresult.vue | 37 ++--- .../InspectionRoute/inspecteddetail.vue | 143 +++++++++++++----- .../InspectionRoute/inspectedstay.vue | 75 +++++---- pages/projectEnd/scan/saoSao.vue | 27 +++- 6 files changed, 195 insertions(+), 104 deletions(-) diff --git a/main.js b/main.js index 4788d853..408665a0 100644 --- a/main.js +++ b/main.js @@ -41,8 +41,8 @@ if (process.env.NODE_ENV === 'development') { // Vue.prototype.url_config = 'http://182.90.224.237:51234/' //雄哥内网穿透地址 // Vue.prototype.url_config = 'http://jxj.zhgdyun.com:61212/' //杰哥内网穿透地址 // Vue.prototype.url_config = ' http://192.168.34.221:28888/' //郭圣雄本地 - // Vue.prototype.url_config = 'http://192.168.34.221:9111/' //郭圣雄本地 - Vue.prototype.url_config = 'http://192.168.34.155:19111/' //彭洁本地 + Vue.prototype.url_config = 'http://192.168.34.221:9111/' //郭圣雄本地 + // Vue.prototype.url_config = 'http://192.168.34.155:19111/' //彭洁本地 // Vue.prototype.work_url = 'http://47.93.215.234:19997' // 工作流线上地址(弃用) // Vue.prototype.work_url = 'http://42.180.188.17:19997' // 工作流线上地址 // Vue.prototype.work_url = 'http://42.180.188.17:19097' // 工作流测试地址 diff --git a/pages.json b/pages.json index 2c6690d2..659e6cbb 100644 --- a/pages.json +++ b/pages.json @@ -2,7 +2,8 @@ "easycom": { "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue" }, - "pages": [{ + "pages": [ + { "path": "pages/login/login", "style": {} }, @@ -2420,12 +2421,10 @@ { "path": "pages/personLocation/exam/examresult/examresult", "style": { - "app-plus": { - "titleNView": { - "titleColor": "#ffffff", - "autoBackButton": false - } - }, + // "app-plus": { + // "titleView":false + // }, + // "navigationStyle": "custom", "navigationBarTitleText": "考试结果" } }, diff --git a/pages/personLocation/exam/examresult/examresult.vue b/pages/personLocation/exam/examresult/examresult.vue index 4e555bf6..612d021c 100644 --- a/pages/personLocation/exam/examresult/examresult.vue +++ b/pages/personLocation/exam/examresult/examresult.vue @@ -17,13 +17,13 @@ 对于成绩不满意可再次考试 + @click="goHiidden('/personLocation/exam/beginexam/beginexam')">再考一次 - {{pageData.score}} + 80 @@ -32,7 +32,7 @@ 恭喜您通过考试 + @click="goHiidden('/personLocation/exam/beginexam/beginexam')">返回 @@ -47,21 +47,12 @@ pageData: {} } }, - created() { - // document.querySelector('.uni-page-head-hd').style.display = 'none' - }, onLoad(options) { this.pageData = JSON.parse(options.examData) }, methods: { - examAgain(url){ - uni.redirectTo({ - url: `/pages${url}?transportData=` + JSON.stringify(this - .pageData) - }); - }, goHiidden(url) { - uni.redirectTo({ + uni.navigateTo({ url: `/pages${url}` }); }, @@ -74,14 +65,15 @@ padding: 61rpx 40rpx; text-align: center; - .text { - font-size: 182.69rpx; - color: #EA3941; - } - .text-success { - font-size: 182.69rpx; - color: #07CC88; - } + .text { + font-size: 182.69rpx; + color: #EA3941; + } + + .text-success { + font-size: 182.69rpx; + color: #07CC88; + } } .image-tip { @@ -94,7 +86,8 @@ justify-content: center; align-items: center; margin: 0 auto; - image{ + + image { width: 150rpx; height: 150rpx; margin-top: 40rpx; diff --git a/pages/projectEnd/InspectionRoute/inspecteddetail.vue b/pages/projectEnd/InspectionRoute/inspecteddetail.vue index e744d759..401d7441 100644 --- a/pages/projectEnd/InspectionRoute/inspecteddetail.vue +++ b/pages/projectEnd/InspectionRoute/inspecteddetail.vue @@ -8,7 +8,7 @@ - + @@ -25,46 +25,56 @@ - - + + + {{item.checkingPointName}} + + - + + - 1号巡检点 + {{item.checkingPointName}} - 巡检点名称:1号巡检点 + 巡检点名称:{{item.checkingPointName}} 巡检点位置:东北角大院 - 巡检人员:张三 - 巡检通知人员:李四 - 状态:正常 - 巡检时间:2024-09-01 12:09:09 - 异常详情:xx发现一个明风险,需要尽快处理 - 异常图片: + 巡检人员:{{item.checkingPointUserName}} + 巡检通知人员:{{item.noticeUserNames}} + 状态:{{item.status == 1 ? '正常' : '异常'}} + 巡检时间:{{item.createDate}} + 异常详情:{{item.alarmDetails}} + + 异常图片: + + + + @@ -75,7 +85,23 @@ export default { data() { return { - info:{}, + info: {}, + checkingList: [], + statusList: [{ + id: 1, + statusName: "未巡检", + image: "/static/inspectelcon-not.png", + }, { + id: 2, + statusName: "正常", + image: "/static/inspecteIcon-normal.png", + }, { + id: 3, + statusName: "异常", + image: "/static/inspectelcon-abnormal.png", + }], + checkingInfoList:[], + statusBarHeight:0, } }, onLoad(options) { @@ -95,12 +121,14 @@ method: 'post', data: { projectSn: this.projectSn, - xzCheckingRouteTaskId: this.info.xzCheckingRoute.id, - checkingPointUserId:this.info.xzCheckingRoute.inspectUserIds, + xzCheckingRouteTaskId: this.info.id, + // checkingPointUserId: this.info.xzCheckingRoute.inspectUserIds, + pageNo: 1, + pageSize: 99999, }, success: res => { - console.log(res); - // that.emergencyTypeList = res.result; + console.log(res.result.records); + that.checkingList = res.result.records; } }) }, @@ -112,17 +140,20 @@ method: 'post', data: { projectSn: this.projectSn, - xzCheckingRouteTaskId: this.info.xzCheckingRoute.id, - checkingPointUserId:this.info.xzCheckingRoute.inspectUserIds, + // xzCheckingRouteTaskId: this.info.id, + checkingPointId:"", + // checkingPointUserId: this.info.xzCheckingRoute.inspectUserIds, + pageNo: 1, + pageSize: 10, }, success: res => { console.log(res); - // that.emergencyTypeList = res.result; + that.checkingInfoList = res.result.records; } }) }, - - getScanCode(){ + + getScanCode() { uni.scanCode({ scanType: ['qrCode'], success: function(res) { @@ -130,7 +161,7 @@ uni.navigateTo({ url: '../scan/saoSao?data=' + res.result }) - + // let qrcodeVal=JSON.parse(res.result) // let param={ // checkingPointId:qrcodeVal.checkingPointId, @@ -139,7 +170,7 @@ // checkingPointUserName:that.userInfo.realName||that.userInfo.account, // position:qrcodeVal.position // } - + // that.sendRequest({ // url: "xmgl/checkingPointInfo/add", // data:param, @@ -156,7 +187,13 @@ // }) } }) - } + }, + //预览图片 + previewImage(url) { + uni.previewImage({ + urls: [url] + }) + }, } } @@ -168,8 +205,8 @@ left: 0; width: 100%; z-index: 2; - - /deep/ .backImg { + + /deep/ .backImg { color: #fff !important; } @@ -185,6 +222,7 @@ top: 50%; z-index: 4; transform: translateY(-50%); + .scancode { width: 56rpx; height: 56rpx; @@ -193,7 +231,7 @@ } .content { - padding: 88rpx 26rpx 15%; + padding: 0 26rpx 15%; box-sizing: border-box; width: 100%; @@ -218,17 +256,19 @@ >view { display: flex; align-items: center; + >image { width: 50rpx; height: 60rpx; margin-right: 8rpx; } } - .abnormal{ - >image { - width: 60rpx !important; - height: 60rpx; - } + } + + .abnormal { + >image { + width: 60rpx !important; + height: 60rpx; } } @@ -249,6 +289,14 @@ height: 60rpx; margin-right: 8rpx; } + + >text { + width: 107rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + text-align: center; + } } } } @@ -284,6 +332,17 @@ >view { font-size: 28rpx; } + + .detail-image { + display: flex; + + image { + width: 128rpx; + height: 112rpx; + margin-left: 8rpx; + } + } + } } } diff --git a/pages/projectEnd/InspectionRoute/inspectedstay.vue b/pages/projectEnd/InspectionRoute/inspectedstay.vue index 18a35626..5699ad0b 100644 --- a/pages/projectEnd/InspectionRoute/inspectedstay.vue +++ b/pages/projectEnd/InspectionRoute/inspectedstay.vue @@ -10,7 +10,7 @@ - + 巡检路线:{{item.xzCheckingRoute.routeName}} @@ -32,21 +32,21 @@ 巡检点情况: - 10/{{item.checkingPointNum}} + {{item.taskToInspectUser ? (item.taskToInspectUser.normalCheckingPointNum + item.taskToInspectUser.abnormalCheckingPointNum) : 0}}/{{item.taskToInspectUser ? item.taskToInspectUser.checkingPointNum : 0}} 正常点位: - 0 + {{item.taskToInspectUser ? item.taskToInspectUser.normalCheckingPointNum : 0}} 异常点位: - 10 + {{item.taskToInspectUser ? item.taskToInspectUser.abnormalCheckingPointNum : 0}} - - 逾期 + + {{item.taskToInspectUser && statusList[item.taskToInspectUser.inspectStatus - 1].statusName}} @@ -55,19 +55,19 @@
    -
  • +
  • - 待巡检 + 待巡检
  • -
  • +
  • - 已巡检 + 已巡检
@@ -87,6 +87,23 @@ //------------ type: 1, + statusList:[{ + id:1, + statusName:"未开始", + color:"#EA3941", + },{ + id:2, + statusName:"进行中", + color:"#5282F6", + },{ + id:3, + statusName:"已完成", + color:"#0DB027", + },{ + id:4, + statusName:"已逾期", + color:"#EA3941", + }], listData: [], checkedTab: 0, condition: { @@ -105,17 +122,17 @@ actualFinishDate: '', teach: true, numberTasks: 0, + statusBarHeight:0, } }, onLoad() { this.checkingPointUserId = JSON.parse(uni.getStorageSync('userInfo')).userId this.condition.projectSn = JSON.parse(uni.getStorageSync('projectDetail')).projectSn; this.statusBarHeight = uni.getStorageSync('systemInfo').statusBarHeight; + console.log(this.checkingPointUserId,JSON.parse(uni.getStorageSync('userInfo'))); }, onShow() { - this.listData = []; - this.condition.pageNo = 1; - this.condition.pageSize = 10; + this.onRefresh(); this.getListData(); }, //上拉触底时间 @@ -132,7 +149,10 @@ this.sendRequest({ url: 'xmgl/xzCheckingRouteTask/page', method: 'get', - data: that.condition, + data: { + ...that.condition, + isInspect: that.tabIndex, + }, success: res => { let arr = JSON.parse(JSON.stringify(this.listData)); if (res.result.records.length > 0) { @@ -143,8 +163,8 @@ that.teach = true; } that.listData = newArr; - that.numberTasks = newArr.length - console.log('进度数据', that.listData) + that.numberTasks = newArr.length; + console.log('进度数据', that.listData); } else { that.teach = false; } @@ -158,8 +178,15 @@ if (type == 'startTime') { // this.form.changeLimitTime = e.f3; this.condition.date = e.f3; + this.onRefresh(); + this.getListData(); } }, + onRefresh(){ + this.listData = []; + this.condition.pageNo = 1; + this.condition.pageSize = 10; + }, goDetail(item) { uni.navigateTo({ url: `/pages/projectEnd/InspectionRoute/inspecteddetail?info=${JSON.stringify(item)}` @@ -167,16 +194,10 @@ }, //底部tab切换 footersChangTab(val) { - this.listData = []; - this.condition.pageNo = 1; - this.condition.pageSize = 10; - // this.condition.dutyUserId = ''; - this.tabIndex = val - // if (val == 1) { - // this.condition.dutyUserId = this.dutyUserId - // } else { - // this.condition.dutyUserId = '' - // } + this.onRefresh(); + + this.tabIndex = val; + this.getListData(); }, getDate(type) { @@ -221,7 +242,7 @@ } .content { - padding: 88rpx 26rpx 15%; + padding: 0 26rpx 15%; box-sizing: border-box; width: 100%; // margin-top: 3%; diff --git a/pages/projectEnd/scan/saoSao.vue b/pages/projectEnd/scan/saoSao.vue index 347175e5..70e3835d 100644 --- a/pages/projectEnd/scan/saoSao.vue +++ b/pages/projectEnd/scan/saoSao.vue @@ -27,7 +27,7 @@ 最低巡检时长 - +
@@ -95,6 +95,8 @@ createData: "", //创建时间 templateList: [], status: 1, + minInspectTime:"", // 最低巡检时长 + minInspectName:"", // 最低巡检时长 }, fileList: [], status: false, @@ -240,6 +242,9 @@ that.form.posiTion = responseData.position that.form.inPointId = responseData.checkingPointId that.form.templateList = JSON.parse(responseData.template) + that.form.minInspectTime = responseData.minInspectTime; + that.form.minInspectName = responseData.minInspectTime + '分钟'; + uni.hideLoading() } }) @@ -335,9 +340,10 @@ buttonText: '确定', success: function(res) { if (res.confirm) { - uni.navigateTo({ - url: '../projectIndex/projectIndex' - }) + // uni.navigateTo({ + // url: '../projectIndex/projectIndex' + // }) + uni.navigateBack(); } } }); @@ -348,6 +354,19 @@ }, //确定提交 addBtn() { + if (this.time < (this.form.minInspectTime * 60)) { + uni.showModal({ + title: '提示', + content: "巡检时长没达标", + confirmColor: '#ee6666', //确定字体颜色 + showCancel: false, //没有取消按钮的弹框 + buttonText: '确定', + success: function(res) { + + }, + }); + return; + } if (!this.form.alarmDetails && this.form.status == 2) { uni.showModal({ title: '提示', From 2e1de42595a1c8a56528b967771bd7479e307a46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9DRain=E2=80=9C?= <904416525@qq.com> Date: Fri, 24 May 2024 21:04:45 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=B7=A1=E6=A3=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InspectionRoute/inspecteddetail.vue | 31 +++++++++++++++---- .../InspectionRoute/inspectedstay.vue | 10 +++--- pages/projectEnd/scan/saoSao.vue | 5 ++- 3 files changed, 34 insertions(+), 12 deletions(-) diff --git a/pages/projectEnd/InspectionRoute/inspecteddetail.vue b/pages/projectEnd/InspectionRoute/inspecteddetail.vue index 401d7441..0c2ac424 100644 --- a/pages/projectEnd/InspectionRoute/inspecteddetail.vue +++ b/pages/projectEnd/InspectionRoute/inspecteddetail.vue @@ -25,7 +25,7 @@ - + {{item.checkingPointName}} @@ -101,7 +101,12 @@ image: "/static/inspectelcon-abnormal.png", }], checkingInfoList:[], + checkingInfoDetail:{ + id:"", + }, statusBarHeight:0, + pageNo: 1, + pageSize: 10, } }, onLoad(options) { @@ -112,6 +117,11 @@ this.getcheckingList(); this.getcheckingInfo(); }, + //上拉触底时间 + onReachBottom() { + this.pageNo = this.pageNo + 1; + this.getcheckingInfo(); + }, methods: { getcheckingList() { let that = this; @@ -132,8 +142,16 @@ } }) }, + onClickSelect(item){ + this.pageNo= 1; + this.pageSize= 10; + this.checkingInfoList = []; + this.checkingInfoDetail = item; + this.getcheckingInfo(); + }, getcheckingInfo() { let that = this; + //获取我整改的巡查记录详情 this.sendRequest({ url: 'xmgl/checkingPointInfo/selectPage', @@ -141,25 +159,26 @@ data: { projectSn: this.projectSn, // xzCheckingRouteTaskId: this.info.id, - checkingPointId:"", + checkingPointId:this.checkingInfoDetail.id, // checkingPointUserId: this.info.xzCheckingRoute.inspectUserIds, - pageNo: 1, - pageSize: 10, + pageNo: that.pageNo, + pageSize: that.pageSize, }, success: res => { console.log(res); - that.checkingInfoList = res.result.records; + that.checkingInfoList = this.checkingInfoList.concat(res.result.records); } }) }, getScanCode() { + const that = this; uni.scanCode({ scanType: ['qrCode'], success: function(res) { console.log('扫一扫得到的数据:' + res.result) uni.navigateTo({ - url: '../scan/saoSao?data=' + res.result + url: `../scan/saoSao?data=${res.result}&id=${that.info.id}` }) // let qrcodeVal=JSON.parse(res.result) diff --git a/pages/projectEnd/InspectionRoute/inspectedstay.vue b/pages/projectEnd/InspectionRoute/inspectedstay.vue index 5699ad0b..28ff5e34 100644 --- a/pages/projectEnd/InspectionRoute/inspectedstay.vue +++ b/pages/projectEnd/InspectionRoute/inspectedstay.vue @@ -32,21 +32,21 @@ 巡检点情况: - {{item.taskToInspectUser ? (item.taskToInspectUser.normalCheckingPointNum + item.taskToInspectUser.abnormalCheckingPointNum) : 0}}/{{item.taskToInspectUser ? item.taskToInspectUser.checkingPointNum : 0}} + {{(item.normalCheckingPointNum + item.abnormalCheckingPointNum)}}/{{item.checkingPointNum ? item.checkingPointNum : 0}} 正常点位: - {{item.taskToInspectUser ? item.taskToInspectUser.normalCheckingPointNum : 0}} + {{item.normalCheckingPointNum ? item.normalCheckingPointNum : 0}} 异常点位: - {{item.taskToInspectUser ? item.taskToInspectUser.abnormalCheckingPointNum : 0}} + {{item.abnormalCheckingPointNum ? item.abnormalCheckingPointNum : 0}} - - {{item.taskToInspectUser && statusList[item.taskToInspectUser.inspectStatus - 1].statusName}} + + {{item.inspectStatus && statusList[item.inspectStatus - 1].statusName}}
diff --git a/pages/projectEnd/scan/saoSao.vue b/pages/projectEnd/scan/saoSao.vue index 70e3835d..fcb2e605 100644 --- a/pages/projectEnd/scan/saoSao.vue +++ b/pages/projectEnd/scan/saoSao.vue @@ -111,7 +111,9 @@ onLoad(e) { this.checkOpenGPSServiceByAndroid() console.log(e.data,'我的测试数据') + console.log(e,'我的测试数据') this.sendData = JSON.parse(e.data); + this.form.id = e.id; uni.showLoading({ title: "获取数据中" }) @@ -326,7 +328,8 @@ position: this.form.posiTion, status: this.form.status, template: JSON.stringify(this.form.templateList), - updateDate: "" + updateDate: "", + xzCheckingRouteTaskId:this.form.id, }, method: "POST",