快乐的昕的电脑
2025-10-31 2a8abd06a4bd56bf4a8d06863580ee26f5a0d5ab
components/mold.vue
@@ -13,7 +13,6 @@
                    <label class="form-label">设置使用上限:</label>
                    <input class="input small-font" type="number" v-model="useLimitInput" placeholder="每次换刀后手填" :disabled="!selectedToolNo || loadingForm" />
                </view>
                <!-- 新增:寿命比预警值输入框 -->
                <view class="form-cell">
                    <label class="form-label">寿命比预警值:</label>
                    <view class="input-with-unit">
@@ -643,29 +642,31 @@
</script>
<style scoped>
    /* 优化表单布局为左对齐 */
    /* 优化顶部表单区域样式 */
    .top-section-grid {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        justify-content: center;
        align-items: center;
        gap: 12px;
        margin-bottom: 2vh;
        width: 95vw;
        max-width: 1600px;
        margin-left: auto;
        margin-right: auto;
        padding: 0 20px;
        padding: 12px;
        background: #f8f9fa;
        border-radius: 8px;
        border: 1px solid #e9ecef;
    }
    /* 表单行样式 - 左对齐 */
    /* 表单行样式优化 */
    .form-row {
        display: flex;
        justify-content: flex-start;
        align-items: flex-end;
        gap: 40px;
        margin-bottom: 16px;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        flex-wrap: wrap;
        margin-bottom: 8px;
    }
        .form-row:last-child {
@@ -675,114 +676,119 @@
    .form-cell {
        display: flex;
        align-items: center;
        flex-shrink: 0;
        flex: 1;
        margin: 0 8px;
        min-height: 40px;
    }
    .form-label {
        width: 100px;
        font-weight: bold;
        text-align: right;
        font-size: 14px;
        color: #333;
        white-space: nowrap;
        margin-right: 8px;
        flex-shrink: 0;
    }
    .input {
        padding: 8px 12px;
        font-size: 14px;
        border: 1px solid #ccc;
        width: 180px;
        border: 1px solid #dcdfe6;
        flex: 1;
        margin-right: 8px;
        border-radius: 4px;
        background: #f8f8f8;
        background: #fff;
        min-width: 0;
        height: 36px;
        box-sizing: border-box;
    }
        /* 小字体样式 */
        .input.small-font {
            font-size: 13px;
        }
        .input:disabled {
            background-color: #f5f7fa;
            color: #c0c4cc;
            cursor: not-allowed;
        }
    .btn-blue {
        background-color: #00A2E9;
        background-color: #1890ff;
        color: white;
        border: none;
        padding: 8px 20px;
        margin-left: 8px;
        padding: 8px 16px;
        border-radius: 4px;
        cursor: pointer;
        font-size: 14px;
        font-weight: bold;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        transition: background 0.2s, box-shadow 0.2s;
        flex-shrink: 0;
        font-weight: 500;
        white-space: nowrap;
        height: 36px;
        box-sizing: border-box;
        transition: all 0.3s;
    }
        .btn-blue:active,
        .btn-blue:focus {
            background-color: #0086c2;
            box-shadow: 0 4px 8px rgba(0,162,233,0.2);
        .btn-blue:hover {
            background-color: #40a9ff;
        }
        .btn-blue:active {
            background-color: #096dd9;
        }
        .btn-blue:disabled {
            background: #b3e0f7;
            color: #eee;
            background: #bae7ff;
            color: #91d5ff;
            cursor: not-allowed;
            box-shadow: none;
        }
    /* 带单位的输入框样式 */
    .input-with-unit {
        display: flex;
        align-items: center;
    }
        .input-with-unit .input {
            width: 150px;
            margin-right: 8px;
        }
    .unit-text {
        color: #666;
        font-size: 13px;
        white-space: nowrap;
        margin-left: 4px;
    }
    /* 操作按钮样式 */
    .button-row {
        display: flex;
        justify-content: flex-start;
        gap: 20px;
        margin: 2vh 0;
        justify-content: center;
        gap: 16px;
        margin: 20px 0;
        padding: 0 20px;
        width: 95vw;
        max-width: 1600px;
        margin-left: auto;
        margin-right: auto;
    }
    .save-btn, .cancel-btn {
        width: 120px;
        padding: 10px 20px;
        background-color: #00A2E9;
        background-color: #1890ff;
        color: white;
        font-size: 14px;
        border: none;
        text-align: center;
        border-radius: 4px;
        transition: background 0.2s;
        cursor: pointer;
        transition: all 0.3s;
    }
        .save-btn:hover {
            background-color: #40a9ff;
        }
        .save-btn:active {
            background-color: #096dd9;
        }
    .cancel-btn {
        background-color: #eee;
        color: #333;
        background-color: #f5f5f5;
        color: #666;
        border: 1px solid #d9d9d9;
    }
        .cancel-btn:hover {
            background-color: #fff;
            border-color: #1890ff;
            color: #1890ff;
        }
        .save-btn:disabled, .cancel-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }
    /* 弹窗样式保持原样 */
    .dialog-overlay {
        position: fixed;
        top: 0;
@@ -879,6 +885,7 @@
        box-shadow: none;
    }
    /* 表格样式保持原样 */
    .table-section {
        display: flex;
        justify-content: center;
@@ -962,47 +969,44 @@
        font-size: 0.9vw;
    }
    .header-badge {
        display: inline-block;
        background: #fff7e6;
        color: #8a6d00;
        border: 1px solid #ffe58f;
        padding: 1px 6px;
        border-radius: 3px;
        margin-left: 6px;
        font-size: 0.8vw;
        vertical-align: middle;
    }
    .warn {
        color: red;
        font-weight: bold;
    }
    .bottom-section {
        display: flex;
        justify-content: space-around;
        margin-top: 2vh;
    }
    .tool-desc {
        margin-top: 2vh;
    }
    /* 新增:带单位的输入框样式 */
    /* 带单位的输入框样式 */
    .input-with-unit {
        display: flex;
        align-items: center;
        flex: 1;
    }
        .input-with-unit .input {
            width: 10vw;
            flex: 1;
            margin-right: 8px;
        }
    .unit-text {
        color: #666;
        font-size: 0.9vw;
        font-size: 14px;
        white-space: nowrap;
        width: 20px;
    }
    /* 响应式调整 */
    @media (max-width: 1200px) {
        .form-cell {
            margin: 0 4px;
        }
        .form-label {
            width: 90px;
            font-size: 13px;
        }
        .input {
            font-size: 13px;
            padding: 6px 10px;
        }
        .btn-blue {
            padding: 6px 12px;
            font-size: 13px;
        }
    }
</style>