快乐的昕的电脑
2025-11-19 aa03f85db96889256075adf31b52a94c4823dfb4
components/WorkOrder.vue
@@ -75,14 +75,13 @@
      <!-- 中部:运行状态 -->
      <view class="section card">
         <view class="form-row">
         <view class="status-row">
            <view class="form-item">
               <label style="color: red;">日停机次数(时长超5分钟):</label>
               <input class="inp" style="width: 40%;" type="number" v-model="todayDowntimeCount" disabled="true" />
               <label style="color: red;">日停机次数(时长超3分钟):</label>
               <input class="inp" type="number" v-model="order.todayDowntimeCount" disabled="true" />
            </view>
            <view class="form-item">
               <label>日停机时长(mi):</label>
               <!-- 这里用计算属性,不能用v-model表达式 -->
               <input class="inp" type="text" :value="downtimeDuration" disabled="true" />
            </view>
            <view class="form-item">
@@ -90,7 +89,7 @@
               <input class="inp" type="text" v-model="utilizationRate" disabled="true" />
            </view>
         </view>
         <view class="form-row">
         <view class="status-row">
            <view class="form-item">
               <label>生产开始时间:</label>
               <input class="inp" type="text" v-model="startTime" disabled="true" />
@@ -108,7 +107,7 @@
      <!-- 下部:品质检验 -->
      <view class="section card">
         <view class="form-row">
         <view class="quality-row">
            <view class="form-item">
               <label>最近首检时间:</label>
               <input class="inp" type="text" v-model="lastInitialCheck" disabled="true" />
@@ -126,7 +125,7 @@
               <input class="inp" type="number" v-model="initialCount" disabled="true" />
            </view>
         </view>
         <view class="form-row">
         <view class="quality-row">
            <view class="form-item">
               <label>最近巡检时间:</label>
               <input class="inp" type="text" v-model="lastPatrolCheck" disabled="true" />
@@ -229,7 +228,7 @@
         // 添加刷新按钮的处理方法
         handleRefresh() {
            this.$sendPostRequest({
               url: "http://192.168.0.94:9095/Numerical/RefreshDev",
                    url: "http://192.168.0.94:9095/Numerical/RefreshDevBycl",
               data: {
                  machineNo: this.order.machineNo
               },
@@ -466,150 +465,232 @@
</script>
<style>
   .top-order {
      margin-bottom: 1vh;
   }
    /* 全局字体放大,可根据需要调整数值 */
    body, .container {
        font-size: 22px;
    }
   .refresh-btn {
      position: absolute;
      top: -11px;
      right: 21px;
      cursor: pointer;
      float: right;
      background-color: #00A2E9;
      color: white;
      border: none;
      font-size: 29px;
      border-radius: 15px;
      margin-top: 9px;
      margin-bottom: 20px;
      padding-left: 25px;
      padding-right: 25px;
   }
    .top-order {
        margin-bottom: 0.3vh;
    }
      .refresh-btn:hover {
         background-color: #00A2E9;
      }
    .refresh-btn {
        position: absolute;
        top: -11px;
        right: 21px;
        cursor: pointer;
        float: right;
        background-color: #00A2E9;
        color: white;
        border: none;
        font-size: 28px;
        border-radius: 12px;
        margin-top: 6px;
        margin-bottom: 10px;
        padding: 10px 28px;
    }
   .form-row {
      display: flex;
      justify-content: space-between;
      margin-bottom: 1.5vh;
   }
        .refresh-btn:hover {
            background-color: #00A2E9;
        }
   .form-item {
      width: 100%;
      padding: 4px;
      margin: 10px 10px;
   }
    .form-row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 0.5vh;
    }
   .inp {
      float: left;
      width: 63%;
      padding: 0.5vh;
      border: 1px solid #ccc;
      border-radius: 0.5vw;
      margin-top: 0.3vh;
      font-size: 1.3vw;
   }
    .form-item {
        width: 100%;
        padding: 2px;
        margin: 4px 8px;
    }
   .status-block p {
      margin: 1vh 0;
      font-size: 1.5vw;
      font-weight: bold;
   }
    .inp {
        float: left;
        width: 85%;
        padding: 3px;
        border: 1px solid #ccc;
        border-radius: 0.5vw;
        margin-top: 0.2vh;
        font-size: 22px;
        height: 36px;
    }
   .card {
      background-color: #fff;
      border-radius: 0.8vw;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
      padding: 1.5vh;
      border: 1px solid black;
      margin-top: -1vh;
      margin-bottom: 2vh;
      font-size: 1.5vw;
   }
    .status-block p {
        margin: 0.5vh 0;
        font-size: 1.8vw;
        font-weight: bold;
    }
   .card-header {
      position: absolute;
      top: -1vh;
      left: 2vw;
      background-color: #ffffff;
      padding: 0.5vh 1vw;
      border-radius: 0.5vw;
      font-weight: bold;
      font-size: 1.8vw;
   }
    .card {
        background-color: #fff;
        border-radius: 0.6vw;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
        padding: 12px;
        border: 1px solid black;
        margin-top: 0;
        margin-bottom: 12px;
        font-size: 22px;
    }
   .form-item label {
      float: left;
      margin-top: 8px;
      font-size: 1.5vw;
      display: inline-block;
      margin-bottom: 0.5vh;
      color: #333;
   }
    .card-header {
        position: absolute;
        top: -1vh;
        left: 2vw;
        background-color: #ffffff;
        padding: 0.3vh 0.8vw;
        border-radius: 0.5vw;
        font-weight: bold;
        font-size: 2vw;
    }
   .status-row label,
   .check-row label {
      width: 30%;
      padding-right: 1vw;
      text-align: right;
      font-size: 1.5vw;
   }
    .form-item label {
        float: left;
        margin-top: 4px;
        font-size: 22px;
        display: inline-block;
        margin-bottom: 0.2vh;
        color: #333;
    }
   .status-row input,
   .check-row input {
      width: 65%;
      font-size: 1.5vw;
   }
    .status-row label,
    .check-row label {
        width: 30%;
        padding-right: 0.6vw;
        text-align: right;
        font-size: 22px;
    }
   .form-row2 {
      display: flex;
      float: left;
      margin-left: -65px;
      flex-direction: column;
      margin-top: -13px;
      line-height: 48px;
      align-content: flex-start;
   }
    .status-row input,
    .check-row input {
        width: 65%;
        font-size: 22px;
        height: 36px;
    }
   .form-row3 {
      display: flex;
      flex-direction: column;
      flex-wrap: nowrap;
      align-content: flex-start;
      justify-content: flex-start;
      align-items: flex-start;
      margin-bottom: 2.5vh
   }
    .form-row2 {
        display: flex;
        float: left;
        margin-left: -65px;
        flex-direction: column;
        margin-top: -10px;
        line-height: 38px;
        align-content: flex-start;
    }
   .form-row4 {
      display: flex;
      flex-direction: row;
      flex-wrap: nowrap;
   }
    .form-row3 {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        align-content: flex-start;
        justify-content: flex-start;
        align-items: flex-start;
        margin-bottom: 0.5vh
    }
   .inp1 {
      width: 42%;
      height: 3.5em;
      font-weight: bolder;
      margin-top: -41px;
      font-size: 39px;
      text-align: center;
      color: red;
   }
    .form-row4 {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
    }
   .inp2 {
      float: right;
      width: 220px;
      height: 220px;
      border-radius: 100%;
      text-align: center;
      margin-top: -42px;
      font-size: 96px;
      background-color: #476ee1fc;
      color: #ffffff;
      margin-right: 172px;
   }
    .inp1 {
        width: 42%;
        height: 2.8em;
        font-weight: bolder;
        margin-top: -35px;
        font-size: 48px;
        text-align: center;
        color: red;
    }
    .inp2 {
        float: right;
        width: 200px;
        height: 200px;
        border-radius: 100%;
        text-align: center;
        margin-top: -35px;
        font-size: 100px;
        background-color: #476ee1fc;
        color: #ffffff;
        margin-right: 140px;
    }
    .quality-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 8px;
    }
        .quality-row .form-item {
            flex: 1;
            margin: 0 6px;
            padding: 2px;
        }
            .quality-row .form-item label {
                width: auto;
                min-width: 95px;
                margin-right: 6px;
                font-size: 22px;
            }
        .quality-row .inp {
            width: 70%;
            min-width: 100px;
            font-size: 22px;
            height: 36px;
            padding: 3px;
        }
    .status-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 8px;
    }
        .status-row .form-item {
            flex: 1;
            margin: 0 6px;
            padding: 2px;
        }
            .status-row .form-item label {
                min-width: 180px;
                white-space: nowrap;
                font-size: 22px;
            }
        .status-row .inp {
            width: 70%;
            min-width: 100px;
            font-size: 22px;
            height: 36px;
            padding: 3px;
        }
    /* 针对1280*717屏幕的特定优化 */
    @media screen and (max-width: 1280px) and (max-height: 800px) {
        .top-order {
            margin-bottom: 0;
        }
        .card {
            padding: 8px;
            margin-bottom: 8px;
        }
        .form-item {
            margin: 2px 6px;
        }
        .quality-row,
        .status-row {
            margin-bottom: 6px;
        }
    }
</style>