diff --git a/src/views/productionSchedulingPlan/basic/equipmentCapacity.vue b/src/views/productionSchedulingPlan/basic/equipmentCapacity.vue index dc064ef..9e21dbf 100644 --- a/src/views/productionSchedulingPlan/basic/equipmentCapacity.vue +++ b/src/views/productionSchedulingPlan/basic/equipmentCapacity.vue @@ -35,7 +35,7 @@

{{ `${item.startNum}≤φ<${item.endNum}` - }}{{ item.standardProcessAbility ? `,${item.standardProcessAbility}min/件` : '' }} + }}{{ item.standardProcessAbility ? `,${item.standardProcessAbility}` : '' }}

@@ -305,63 +305,7 @@ export default { }; }, methods: { - // 计算合并单元格数据 - getSpanArr() { - this.spanArr = [ - { prop: 'workCenterName', span: [] }, - { prop: 'equipName', span: [] }, - { prop: 'equipCode', span: [] }, - ]; - - this.spanArr.forEach(item => { - item.span = []; - item.pos = 0; // 记录合并起始位置 - - for (let i = 0; i < this.data.length; i++) { - if (i === 0) { - // 第一行 - item.span.push(1); - item.pos = 1; - } else { - // 判断当前行与上一行是否相同 - if (this.data[i][item.prop] === this.data[i - 1][item.prop]) { - // 相同则合并行数 +1 - item.span[this.pos] += 1; - item.span.push(0); - } else { - // 不同则重新开始 - item.span.push(1); - item.pos = i; - } - } - } - }); - }, - // 合并单元格方法 - spanMethod({ row, column, rowIndex, columnIndex }) { - // 只处理前三列 - const mergeProps = ['workCenterName', 'equipName', 'equipCode']; - - if (!mergeProps.includes(column.property)) { - return [1, 1]; - } - - // 查找对应列的合并数据 - const spanData = this.spanArr.find(item => item.prop === column.property); - console.log(9999999, column.property); - if (!spanData) { - return [1, 1]; - } - - const rowspan = spanData.span[rowIndex] || 1; - const colspan = rowspan > 0 ? 1 : 0; - - return { - rowspan: rowspan, - colspan: colspan, - }; - }, - // 新增 + handleAdd() { this.addShow = true; this.moldAddMore = true;