diff --git a/src/views/modules/inspection/com_inspectionScheduleView.vue b/src/views/modules/inspection/com_inspectionScheduleView.vue
index 4d4fb9a..2e3cad8 100644
--- a/src/views/modules/inspection/com_inspectionScheduleView.vue
+++ b/src/views/modules/inspection/com_inspectionScheduleView.vue
@@ -12,17 +12,18 @@
@current-change="handleQcSelect"
@row-click="handleQcSelect"
style="width: 100%;"
+ :max-height="qcTableHeight"
class="qc-table">
-
+
排程
+ @click.stop="openScheduleDialog(null, scope.row)">{{ currentStatusDb === 'Scheduled' ? '修改' : '排程' }}
@@ -106,6 +107,7 @@ export default {
selectedQc: null,
scheduleDays: [],
loading: false,
+ qcTableHeight: 500,
scheduleDialogVisible: false,
scheduleForm: {
qcOperator: '',
@@ -144,8 +146,22 @@ export default {
console.log('[排程视图] 组件已挂载')
// 组件挂载时自动加载QC列表和排程数据
this.loadQcList()
+ // 计算QC表格高度
+ this.$nextTick(() => {
+ this.calculateQcTableHeight()
+ })
},
methods: {
+ // 计算QC表格高度
+ calculateQcTableHeight() {
+ // 计算10行数据的高度
+ // Element UI mini尺寸的表格,每行高度约为40px(包含边框)
+ const rowHeight = 40
+ const headerHeight = 45 // 表头高度
+ const rowCount = 10 // 显示10行数据
+
+ this.qcTableHeight = (rowHeight * rowCount) + headerHeight + 2 // 加2px用于边框
+ },
// 强制刷新当前选中的QC排程视图(供父组件调用)
forceRefresh() {
console.log('[排程视图] forceRefresh 被调用')
@@ -226,6 +242,14 @@ export default {
planEndDate: '',
remark: ''
}
+
+ // 如果是已排程状态,加载当前排程数据用于修改
+ if (this.currentStatusDb === 'Scheduled' && this.currentRow && this.currentRow.planStartDate) {
+ this.scheduleForm.planStartDate = this.currentRow.planStartDate || ''
+ this.scheduleForm.planEndDate = this.currentRow.planEndDate || this.currentRow.planStartDate || ''
+ this.scheduleForm.remark = this.currentRow.remark || ''
+ }
+
this.scheduleDialogVisible = true
},
@@ -434,17 +458,17 @@ export default {
background: #fff;
display: flex;
flex-direction: column;
- height: 220px;
+ height: 280px;
width: 100%;
.card-header {
- padding: 8px 10px;
+ padding: 10px 12px;
background: #f5f7fa;
border-bottom: 2px solid #dcdfe6;
display: flex;
justify-content: space-between;
align-items: center;
- height: 40px;
+ height: 45px;
flex-shrink: 0;
.date-label {
@@ -460,11 +484,11 @@ export default {
}
.card-body {
- padding: 8px;
+ padding: 10px;
display: flex;
flex-direction: column;
- gap: 6px;
- height: calc(100% - 40px);
+ gap: 8px;
+ height: calc(100% - 45px);
overflow-y: auto;
&::-webkit-scrollbar {
@@ -483,7 +507,7 @@ export default {
}
.task-item {
- padding: 8px;
+ padding: 10px;
background: #f5f7fa;
border: 1px solid #dcdfe6;
border-radius: 3px;
@@ -498,20 +522,20 @@ export default {
}
.task-no {
- font-size: 12px;
+ font-size: 13px;
font-weight: bold;
color: #409eff;
- margin-bottom: 4px;
+ margin-bottom: 5px;
}
.task-supplier {
- font-size: 11px;
+ font-size: 12px;
color: #606266;
word-wrap: break-word;
word-break: break-all;
white-space: normal;
- line-height: 1.4;
- margin-bottom: 3px;
+ line-height: 1.5;
+ margin-bottom: 4px;
}
.task-address {