| | |
| | | <view class="form-row"> |
| | | <view class="form-item"> |
| | | <label style="color: red;">日停机次数(时长超5分钟):</label> |
| | | <input class="inp" style="width: 40%;" type="number" v-model="todayFaultNum" disabled="true" /> |
| | | <input class="inp" style="width: 40%;" type="number" v-model="todayDowntimeCount" disabled="true" /> |
| | | </view> |
| | | <view class="form-item"> |
| | | <label>日停机时长(mi):</label> |
| | | <input class="inp" type="text" v-model="todayRunTime" disabled="true" /> |
| | | <!-- 这里用计算属性,不能用v-model表达式 --> |
| | | <input class="inp" type="text" :value="downtimeDuration" disabled="true" /> |
| | | </view> |
| | | <view class="form-item"> |
| | | <label>设备稼动率:</label> |
| | |
| | | DAA003List: [], |
| | | lineList: [], |
| | | }; |
| | | }, |
| | | computed: { |
| | | // 日停机时长 = todayOnlineTime - todayRunTime |
| | | downtimeDuration() { |
| | | // 取order对象中的todayOnlineTime和todayRunTime,都为分钟 |
| | | const online = Number(this.order.todayOnlineTime) || 0; |
| | | const run = Number(this.order.todayRunTime) || 0; |
| | | return online - run; |
| | | } |
| | | }, |
| | | created() { |
| | | this.fetchData(true); |
| | |
| | | cutterName, //刀具名称 |
| | | cutterModel, //刀具规格 |
| | | jdl: '', |
| | | startCjNum: 0, // 新增兜底字段 保留其它注释 |
| | | currentCjNum: 0 // 新增兜底字段 |
| | | startCjNum: 0, // 开工数采 |
| | | currentCjNum: 0, // 当前数采 |
| | | todayDowntimeCount //今日停机次数 |
| | | }; |
| | | return; |
| | | } |
| | |
| | | //this.productionDuration = (this.order.todayOnlineTime / 3600).toFixed(2) + "h"; |
| | | this.todayFaultNum = this.order.todayFaultNum; |
| | | this.utilizationRate = this.order.jdl + '%'; |
| | | let title = this.machineNo + '号机台 工单号' + this.order.daa001 + ',当前数采' + this.order.currentCjNum; |
| | | let title = this.machineNo + '号机台 工单号' + this.order.daa001 + ',当前数采' + this.order.currentCjNum; // 标题中使用 currentCjNum |
| | | this.setTitle(title); |
| | | }) |
| | | }, |
| | | setTitle(title) { |
| | | // 修改页面标题的方法,uni-app中可以通过api直接设置当前页面的标题 |
| | | uni.setNavigationBarTitle({ |
| | | title: title |
| | | }); |
| | |
| | | let latest = sjList[0]; |
| | | this.lastInitialCheck = latest.fcheckDate; |
| | | this.initialConclusion = latest.fcheckResu; |
| | | this.initialInspector = latest.checkUser; |
| | | this.initialCount = sjList.length; |
| | | this.initialInspector = latest.fcheckBy; // 首检人员(工号-姓名) |
| | | this.initialCount = latest.xjCount ?? sjList.length; // 优先用xjCount字段 |
| | | } else if (sjList) { |
| | | this.lastInitialCheck = sjList.fcheckDate; |
| | | this.initialConclusion = sjList.fcheckResu; |
| | | this.initialInspector = sjList.checkUser; |
| | | this.initialCount = 1; |
| | | this.initialInspector = sjList.fcheckBy; // 首检人员(工号-姓名) |
| | | this.initialCount = sjList.xjCount ?? 1; |
| | | } else { |
| | | this.lastInitialCheck = ''; |
| | | this.initialConclusion = ''; |
| | |
| | | let latest = xjList[0]; |
| | | this.lastPatrolCheck = latest.fcheckDate; |
| | | this.patrolConclusion = latest.fcheckResu; |
| | | this.patrolInspector = latest.checkUser; |
| | | this.patrolCount = xjList.length; |
| | | this.patrolInspector = latest.fcheckBy; // 巡检人员(工号-姓名) |
| | | this.patrolCount = latest.xjCount ?? xjList.length; |
| | | } else if (xjList) { |
| | | this.lastPatrolCheck = xjList.fcheckDate; |
| | | this.patrolConclusion = xjList.fcheckResu; |
| | | this.patrolInspector = xjList.checkUser; |
| | | this.patrolCount = 1; |
| | | this.patrolInspector = xjList.fcheckBy; // 巡检人员(工号-姓名) |
| | | this.patrolCount = xjList.xjCount ?? 1; |
| | | } else { |
| | | this.lastPatrolCheck = ''; |
| | | this.patrolConclusion = ''; |