| | |
| | | <template> |
| | | <view> |
| | | |
| | | <view class="container" style="display: flex; |
| | | flex-direction: row; |
| | | flex-wrap: nowrap; |
| | | align-content: flex-start; |
| | | justify-content: flex-start;"> |
| | | <view class="container" style="display: flex; flex-direction: row; flex-wrap: nowrap; align-content: flex-start; justify-content: flex-start;"> |
| | | <!--主界面--> |
| | | <!-- 上部:工单选择和机台信息 --> |
| | | <view class="top-order" style=" display:inline-block;"> |
| | | <view class="top-order" style="display:inline-block;"> |
| | | <view class="form-row4"> |
| | | <view class="form-row" style="display: flex; |
| | | flex-direction: column; |
| | | flex-wrap: nowrap; |
| | | justify-content: flex-start; |
| | | align-items: center;"> |
| | | <view class="form-row" style="display: flex; flex-direction: column; flex-wrap: nowrap; justify-content: flex-start; align-items: center;"> |
| | | <view class="form-item"> |
| | | <label>工单编号:</label> |
| | | <input class="inp" type="text" v-model="order.daa001" disabled="true" /> |
| | |
| | | </view> |
| | | <view class="form-item"> |
| | | <label>产品规格:</label> |
| | | <input class="inp" type="text" v-model="order.daa004" disabled="true" /><!-- 保留原绑定与注释,未改 --> |
| | | <input class="inp" type="text" v-model="order.daa004" disabled="true" /> |
| | | </view> |
| | | <view class="form-item"> |
| | | <label>报工数量:</label> |
| | |
| | | </view> |
| | | </view> |
| | | <view class="form-row1"> |
| | | <view class="form-item" style=" display:inline-block;"> |
| | | <view class="form-item" style="display:inline-block;"> |
| | | <label>工单状态:</label> |
| | | <input class="inp1" type="text" v-model="order.daa018" disabled="true" /> |
| | | <!-- 刷新按钮 --> |
| | |
| | | <input class="inp" type="text" v-model="initialConclusion" disabled="true" /> |
| | | </view> |
| | | <view class="form-item"> |
| | | <label>巡检次数:</label><!--首检次数???--> |
| | | <input class="inp" type="number" v-model="patrolCount" disabled="true" /> |
| | | <label>首检人员:</label> |
| | | <input class="inp" type="text" v-model="initialInspector" disabled="true" /> |
| | | </view> |
| | | <view class="form-item"> |
| | | <label>首检次数:</label> |
| | | <input class="inp" type="number" v-model="initialCount" disabled="true" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-row"> |
| | |
| | | <view class="form-item"> |
| | | <label>巡检结论:</label> |
| | | <input class="inp" type="text" v-model="patrolConclusion" disabled="true" /> |
| | | </view> |
| | | <view class="form-item"> |
| | | <label>巡检人员:</label> |
| | | <input class="inp" type="text" v-model="patrolInspector" disabled="true" /> |
| | | </view> |
| | | <view class="form-item"> |
| | | <label>巡检次数:</label> |
| | |
| | | productionDuration: '', |
| | | lastInitialCheck: '', |
| | | initialConclusion: '', |
| | | initialInspector: '', |
| | | initialCount: 0, |
| | | lastPatrolCheck: '', |
| | | patrolConclusion: '', |
| | | patrolInspector: '', |
| | | patrolCount: 0, |
| | | timer: null, // Timer reference |
| | | timer: null, |
| | | |
| | | DAA003List: [], |
| | | lineList: [], |
| | |
| | | this.init(); |
| | | }, |
| | | mounted() { |
| | | this.fetchData(false); // Initial fetch |
| | | this.timer = setInterval(this.fetchData, 120000); // Call fetchData every 3 minutes |
| | | this.fetchData(false); |
| | | this.timer = setInterval(this.fetchData, 120000); |
| | | }, |
| | | beforeDestroy() { |
| | | clearInterval(this.timer); // Clear the timer on component destruction |
| | | clearInterval(this.timer); |
| | | }, |
| | | methods: { |
| | | init() { |
| | |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | onDaa003Change(event) { |
| | | let orde = this.lineList[this.DAA003List.indexOf(event)]; |
| | | this.orderId = orde.id; |
| | |
| | | //this.productionDuration = (this.order.todayOnlineTime / 3600).toFixed(2) + "h"; |
| | | this.todayFaultNum = this.order.todayFaultNum; |
| | | this.utilizationRate = this.order.jdl + '%'; |
| | | // this.startTime = this.order.workStartDate; |
| | | // this.endTime = this.order.workEndDate; |
| | | let title = this.machineNo + '号机台 工单号' + this.order.daa001 + ',当前数采' + this.order.currentCjNum; // 标题中使用 currentCjNum |
| | | let title = this.machineNo + '号机台 工单号' + this.order.daa001 + ',当前数采' + this.order.currentCjNum; |
| | | this.setTitle(title); |
| | | }) |
| | | }, |
| | | setTitle(title) { |
| | | // 修改页面标题的方法,uni-app中可以通过api直接设置当前页面的标题 |
| | | uni.setNavigationBarTitle({ |
| | | title: title |
| | | }); |
| | |
| | | orderNo: this.orderNo |
| | | } |
| | | }).then(res => { |
| | | //this.order = res.data.tbBillList; |
| | | this.lastInitialCheck = res.data.tbBillList.fcheckDate; |
| | | this.initialConclusion = res.data.tbBillList.fcheckResu; |
| | | let sjList = res.data.tbBillList; |
| | | if (Array.isArray(sjList) && sjList.length > 0) { |
| | | let latest = sjList[0]; |
| | | this.lastInitialCheck = latest.fcheckDate; |
| | | this.initialConclusion = latest.fcheckResu; |
| | | this.initialInspector = latest.checkUser; |
| | | this.initialCount = sjList.length; |
| | | } else if (sjList) { |
| | | this.lastInitialCheck = sjList.fcheckDate; |
| | | this.initialConclusion = sjList.fcheckResu; |
| | | this.initialInspector = sjList.checkUser; |
| | | this.initialCount = 1; |
| | | } else { |
| | | this.lastInitialCheck = ''; |
| | | this.initialConclusion = ''; |
| | | this.initialInspector = ''; |
| | | this.initialCount = 0; |
| | | } |
| | | }) |
| | | }, |
| | | getXJByOrder() { |
| | |
| | | orderNo: this.orderNo |
| | | } |
| | | }).then(res => { |
| | | //this.order = res.data.tbBillList; |
| | | this.lastPatrolCheck = res.data.tbBillList.fcheckDate; |
| | | this.patrolConclusion = res.data.tbBillList.fcheckResu; |
| | | this.patrolCount = res.data.tbBillList.xjCount; |
| | | let xjList = res.data.tbBillList; |
| | | if (Array.isArray(xjList) && xjList.length > 0) { |
| | | let latest = xjList[0]; |
| | | this.lastPatrolCheck = latest.fcheckDate; |
| | | this.patrolConclusion = latest.fcheckResu; |
| | | this.patrolInspector = latest.checkUser; |
| | | this.patrolCount = xjList.length; |
| | | } else if (xjList) { |
| | | this.lastPatrolCheck = xjList.fcheckDate; |
| | | this.patrolConclusion = xjList.fcheckResu; |
| | | this.patrolInspector = xjList.checkUser; |
| | | this.patrolCount = 1; |
| | | } else { |
| | | this.lastPatrolCheck = ''; |
| | | this.patrolConclusion = ''; |
| | | this.patrolInspector = ''; |
| | | this.patrolCount = 0; |
| | | } |
| | | }) |
| | | } |
| | | } |
| | |
| | | position: absolute; |
| | | top: -11px; |
| | | right: 21px; |
| | | /* padding: 10px 20px; */ |
| | | cursor: pointer; |
| | | float: right; |
| | | background-color: #00A2E9; |
| | |
| | | border: none; |
| | | font-size: 29px; |
| | | border-radius: 15px; |
| | | margin-top: -23px; |
| | | padding-left: 25px; |
| | | padding-right: 25px; |
| | | margin-top: 9px; |
| | | margin-bottom: 20px; |
| | | padding-left: 25px; |
| | | padding-right: 25px; |
| | | } |
| | | |
| | | .refresh-btn:hover { |
| | |
| | | border-radius: 0.5vw; |
| | | margin-top: 0.3vh; |
| | | font-size: 1.3vw; |
| | | /* Larger font for inputs */ |
| | | } |
| | | |
| | | |
| | | .status-block p { |
| | | margin: 1vh 0; |
| | |
| | | font-weight: bold; |
| | | } |
| | | |
| | | /* 卡片样式 */ |
| | | .card { |
| | | background-color: #fff; |
| | | border-radius: 0.8vw; |
| | |
| | | margin-top: -1vh; |
| | | margin-bottom: 2vh; |
| | | font-size: 1.5vw; |
| | | /* Base font size for card content */ |
| | | } |
| | | |
| | | /* 卡片标题在左上角 */ |
| | | .card-header { |
| | | position: absolute; |
| | | top: -1vh; |
| | |
| | | border-radius: 0.5vw; |
| | | font-weight: bold; |
| | | font-size: 1.8vw; |
| | | /* Larger font for headers */ |
| | | } |
| | | |
| | | .form-item label { |
| | | float: left; |
| | | margin-top: 8px; |
| | | font-size: 1.5vw; |
| | | /* Larger font for labels */ |
| | | display: inline-block; |
| | | margin-bottom: 0.5vh; |
| | | color: #333; |
| | | } |
| | | |
| | | |
| | | .status-row label, |
| | | .check-row label { |
| | |
| | | padding-right: 1vw; |
| | | text-align: right; |
| | | font-size: 1.5vw; |
| | | /* Increased font for labels in status sections */ |
| | | } |
| | | |
| | | .status-row input, |
| | |
| | | border-radius: 100%; |
| | | text-align: center; |
| | | margin-top: -42px; |
| | | /* margin-left: 37px; */ |
| | | font-size: 96px; |
| | | background-color: #476ee1fc; |
| | | color: #ffffff; |