快乐的昕的电脑
2025-10-18 ec4ede1c562b899312bd18a8e5520e7f4e8b732f
界面优化
已修改2个文件
109 ■■■■■ 文件已修改
components/WorkOrder.vue 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
components/machine.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
components/WorkOrder.vue
@@ -1,20 +1,11 @@
<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" />
@@ -59,7 +50,7 @@
                        </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>
@@ -69,7 +60,7 @@
                </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" />
                    <!-- 刷新按钮 -->
@@ -126,8 +117,12 @@
                    <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">
@@ -138,6 +133,10 @@
                <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>
@@ -171,10 +170,13 @@
                productionDuration: '',
                lastInitialCheck: '',
                initialConclusion: '',
                initialInspector: '',
                initialCount: 0,
                lastPatrolCheck: '',
                patrolConclusion: '',
                patrolInspector: '',
                patrolCount: 0,
                timer: null, // Timer reference
                timer: null,
                DAA003List: [],
                lineList: [],
@@ -186,11 +188,11 @@
            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() {
@@ -231,7 +233,6 @@
                    }
                });
            },
            onDaa003Change(event) {
                let orde = this.lineList[this.DAA003List.indexOf(event)];
                this.orderId = orde.id;
@@ -385,14 +386,11 @@
                    //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
                });
@@ -404,9 +402,24 @@
                        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() {
@@ -416,10 +429,24 @@
                        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;
                    }
                })
            }
        }
@@ -435,7 +462,6 @@
        position: absolute;
        top: -11px;
        right: 21px;
        /* padding: 10px 20px; */
        cursor: pointer;
        float: right;
        background-color: #00A2E9;
@@ -443,11 +469,10 @@
        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 {
@@ -474,9 +499,7 @@
        border-radius: 0.5vw;
        margin-top: 0.3vh;
        font-size: 1.3vw;
        /* Larger font for inputs */
    }
    .status-block p {
        margin: 1vh 0;
@@ -484,7 +507,6 @@
        font-weight: bold;
    }
    /* 卡片样式 */
    .card {
        background-color: #fff;
        border-radius: 0.8vw;
@@ -494,10 +516,8 @@
        margin-top: -1vh;
        margin-bottom: 2vh;
        font-size: 1.5vw;
        /* Base font size for card content */
    }
    /* 卡片标题在左上角 */
    .card-header {
        position: absolute;
        top: -1vh;
@@ -507,19 +527,16 @@
        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 {
@@ -527,7 +544,6 @@
        padding-right: 1vw;
        text-align: right;
        font-size: 1.5vw;
        /* Increased font for labels in status sections */
    }
    .status-row input,
@@ -579,7 +595,6 @@
        border-radius: 100%;
        text-align: center;
        margin-top: -42px;
        /*     margin-left: 37px; */
        font-size: 96px;
        background-color: #476ee1fc;
        color: #ffffff;
components/machine.vue
@@ -16,7 +16,7 @@
                <button :class="maStartTime ? 'btn-disabled' : 'btn-blue'"
                        :disabled="!!maStartTime"
                        @click="handleMaStartTime">
                    调机开始(=换模完成)
                    调机开始
                </button>
                <!-- 显示调机开始时间 -->
                <input class="txt-inp" v-model="maStartTime" placeholder="点击按钮带出时间" disabled="true" />