From c0fe59c6cf05c22a6507c8e34d7f51550acfec10 Mon Sep 17 00:00:00 2001 From: 展杰 <1240968267@qq.com> Date: 星期四, 09 十一月 2023 17:52:20 +0800 Subject: [PATCH] 首检巡检 --- pages/inspection/inspectionList.vue | 91 ++++++++++++++++++++++++++++++++------------- 1 files changed, 65 insertions(+), 26 deletions(-) diff --git a/pages/inspection/inspectionList.vue b/pages/inspection/inspectionList.vue index 773aed0..2c78293 100644 --- a/pages/inspection/inspectionList.vue +++ b/pages/inspection/inspectionList.vue @@ -1,6 +1,7 @@ <template> <view> - <uni-card v-for="item in inspections" @click="gotoInfo(item)"> + <uni-card v-for="item in inspections" @click="gotoInfo(item)" class="card-box" > + <view :class="new Date().getTime()-new Date(item.BEGIN_TIME).getTime()>(3600000*item.FREQUENCY)?'red':''"> <u-row customStyle="margin-bottom: 10px"> <u-col span="2"> <label>妫�楠屽崟鍙�:</label> @@ -11,13 +12,24 @@ </u-row> <u-row customStyle="margin-bottom: 10px"> <u-col span="2"> + <label>妫�楠屽崟鍒涘缓鏃堕棿:</label> + </u-col> + <u-col span="4"> + <label>{{item.BEGIN_TIME}}</label> + </u-col> + </u-row> + <view class="f_type"> + {{item.FTYPE}} + </view> + <u-row customStyle="margin-bottom: 10px"> + <u-col span="2"> <label>鏈哄彴鍙�:</label> </u-col> <u-col span="4"> <label>{{item.MACHINE_NO}}</label> </u-col> </u-row> - <u-row customStyle="margin-bottom: 10px"> + <u-row customStyle="margin-bottom: 10px" v-if="item.PROC_NAME"> <u-col span="2"> <label>宸ュ簭鍚嶇О:</label> </u-col> @@ -27,29 +39,29 @@ </u-row> <u-row customStyle="margin-bottom: 10px"> <u-col span="2"> - <label>妫�楠岄鐜囷紙H锛�:</label> - </u-col> - <u-col span="4"> - <label></label> - </u-col> - </u-row> - <u-row customStyle="margin-bottom: 10px"> - <u-col span="2"> <label>浜у搧鍚嶇О:</label> </u-col> - <u-col span="4"> - <label>{{item.ITEM_NAME}}</label> + <u-col> + <label>{{item.ITEM_NO}} | {{item.ITEM_NAME}}</label> </u-col> </u-row> <u-row customStyle="margin-bottom: 10px"> <u-col span="2"> - <label>浜у搧缂栧彿:</label> + <label>鍥惧彿棰滆壊:</label> </u-col> - <u-col span="4"> - <label>{{item.ITEM_NO}}</label> + <u-col> + <label>{{item.ENGINEERING_NO}} / {{item.COLOR_NAME}}</label> </u-col> </u-row> <u-row customStyle="margin-bottom: 10px"> + <u-col span="2"> + <label>瑙勬牸鏉愯川:</label> + </u-col> + <u-col> + <label>{{item.MODEL}} / {{item.MATERIAL}}</label> + </u-col> + </u-row> + <u-row customStyle="margin-bottom: 10px" v-if="item.OPERATE_MAN"> <u-col span="2"> <label>鎿嶄綔鍛�:</label> </u-col> @@ -59,18 +71,18 @@ </u-row> <u-row customStyle="margin-bottom: 10px"> <u-col span="2"> - <label>妫�楠岀被鍨�</label> + <label>妫�楠岀被鍨�:</label> </u-col> <u-col span="4"> - <label>{{item.REMEKE}}</label> + <label>{{item.FTYPE}}</label> </u-col> </u-row> <u-row customStyle="margin-bottom: 10px"> <u-col span="2"> - <label>涓婃妫�楠屾椂闂�</label> + <label>妫�楠岄鐜�(H):</label> </u-col> <u-col span="4"> - <label></label> + <label>{{item.FREQUENCY}}灏忔椂</label> </u-col> </u-row> <u-row customStyle="margin-bottom: 10px"> @@ -78,9 +90,11 @@ <label>涓嬫妫�楠屾椂闂�</label> </u-col> <u-col span="4"> - <label></label> + <label>{{item.NEXT_TIME}}</label> </u-col> </u-row> + </view> + </uni-card> <u-toast ref="uToast" /> </view> @@ -91,15 +105,16 @@ export default { data() { return { - inspections: [] + inspections: [], + moduleKey:0 } }, onLoad() { this.getInspections() }, - onBackPress() { - uni.navigateBack({delta:1}) - }, + //onShow:function(){ + // this.getInspections() + //}, methods: { getInspections() { getInspectionList().then(res => { @@ -117,13 +132,37 @@ gotoInfo(e) { console.log(e) uni.navigateTo({ - url:'/pages/inspection/inspectionInfo?item='+ encodeURIComponent(JSON.stringify(e)) , + url:'/pages/inspection/inspectionInfo?item='+ encodeURIComponent(JSON.stringify(e).replace(/\%/g, '%25').replace(/\ /g,'%20').replace(/\?/g,'%3F').replace(/\+/g,'%2B').replace(/\&/g,'%26')) , }) - } + }, + reload(){ + this.$nextTick(()=>{ + this.$refs.uToast.show({ + message: "鎻愪氦鎴愬姛", + type: 'success' + }) + this.getInspections() + }) + }, } } </script> <style> + .red{ + color: red; + } + .card-box{ + position: relative; + } + .f_type{ + position: absolute; + right: 13%; + top:12%; + width: 20px; + line-height: 100px; + font-size: 8vh; + margin: 0 auto; + } </style> \ No newline at end of file -- Gitblit v1.9.3