|
|
|
|
@ -19,13 +19,14 @@ |
|
|
|
|
@on-load="onLoad" |
|
|
|
|
:before-open="beforeOpen" |
|
|
|
|
:span-method="spanMethod" |
|
|
|
|
@sort-change="sortChange" |
|
|
|
|
> |
|
|
|
|
<template #menu-left> |
|
|
|
|
<el-button type="primary" @click="handleAdd">新增</el-button> |
|
|
|
|
<el-button type="primary" @click="handleAdd" v-if="permission.equipmentCapacity_add">新增</el-button> |
|
|
|
|
</template> |
|
|
|
|
<template #menu-right> </template> |
|
|
|
|
<template #menu="{ row }"> |
|
|
|
|
<el-button type="text" @click="handleEdit(row)">修改</el-button> |
|
|
|
|
<el-button type="text" @click="handleEdit(row)" v-if="permission.equipmentCapacity_edit">修改</el-button> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<template #standardProcessAbility="scope"> |
|
|
|
|
@ -64,6 +65,7 @@ import { |
|
|
|
|
updateEquipAbility, |
|
|
|
|
} from '@/api/productionSchedulingPlan/basic'; |
|
|
|
|
import addEquipment from './components/addEquipment.vue'; |
|
|
|
|
import { mapGetters } from 'vuex'; |
|
|
|
|
import { ElButton } from 'element-plus'; |
|
|
|
|
export default { |
|
|
|
|
components: { |
|
|
|
|
@ -97,7 +99,7 @@ export default { |
|
|
|
|
addBtn: false, |
|
|
|
|
editBtn: false, |
|
|
|
|
viewBtn: false, |
|
|
|
|
delBtn: true, |
|
|
|
|
delBtn: false, |
|
|
|
|
editBtnText: '修改', |
|
|
|
|
labelWidth: 120, |
|
|
|
|
menuWidth: 120, |
|
|
|
|
@ -126,7 +128,7 @@ export default { |
|
|
|
|
label: '作业中心', |
|
|
|
|
prop: 'workCenterName', |
|
|
|
|
search: true, |
|
|
|
|
sortable: true, |
|
|
|
|
sortable: 'custom', |
|
|
|
|
span: 12, |
|
|
|
|
display: false, |
|
|
|
|
width: 120, |
|
|
|
|
@ -135,7 +137,7 @@ export default { |
|
|
|
|
label: '设备名称', |
|
|
|
|
prop: 'equipName', |
|
|
|
|
search: true, |
|
|
|
|
sortable: true, |
|
|
|
|
sortable: 'custom', |
|
|
|
|
span: 12, |
|
|
|
|
width: 120, |
|
|
|
|
disabled: true, |
|
|
|
|
@ -144,7 +146,7 @@ export default { |
|
|
|
|
label: '设备编码', |
|
|
|
|
prop: 'equipCode', |
|
|
|
|
search: true, |
|
|
|
|
sortable: true, |
|
|
|
|
sortable: 'custom', |
|
|
|
|
span: 12, |
|
|
|
|
width: 120, |
|
|
|
|
disabled: true, |
|
|
|
|
@ -154,7 +156,7 @@ export default { |
|
|
|
|
// label: '设备型号', |
|
|
|
|
// prop: 'equipNameType', |
|
|
|
|
// search: false, |
|
|
|
|
// sortable: true, |
|
|
|
|
// sortable: 'custom', |
|
|
|
|
// span: 12, |
|
|
|
|
// width: 120, |
|
|
|
|
// disabled: true, |
|
|
|
|
@ -164,7 +166,7 @@ export default { |
|
|
|
|
label: '设备分类', |
|
|
|
|
prop: 'equipType', |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
sortable: 'custom', |
|
|
|
|
span: 12, |
|
|
|
|
width: 120, |
|
|
|
|
type: 'select', |
|
|
|
|
@ -190,7 +192,7 @@ export default { |
|
|
|
|
label: '设备排序', |
|
|
|
|
prop: 'equipOrder', |
|
|
|
|
search: true, |
|
|
|
|
sortable: true, |
|
|
|
|
sortable: 'custom', |
|
|
|
|
span: 12, |
|
|
|
|
width: 120, |
|
|
|
|
disabled: true, |
|
|
|
|
@ -199,7 +201,7 @@ export default { |
|
|
|
|
label: '工序', |
|
|
|
|
prop: 'processName', |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
sortable: 'custom', |
|
|
|
|
span: 12, |
|
|
|
|
display: false, |
|
|
|
|
width: 120, |
|
|
|
|
@ -208,7 +210,7 @@ export default { |
|
|
|
|
label: '工艺能力', |
|
|
|
|
prop: 'craftName', |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
sortable: 'custom', |
|
|
|
|
span: 12, |
|
|
|
|
display: false, |
|
|
|
|
width: 120, |
|
|
|
|
@ -217,7 +219,7 @@ export default { |
|
|
|
|
label: '额定加工能力(烧结-件/热表-dm²)', |
|
|
|
|
prop: 'standardProcessAbility', |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
sortable: 'custom', |
|
|
|
|
span: 14, |
|
|
|
|
width: 270, |
|
|
|
|
labelWidth: 270, |
|
|
|
|
@ -234,7 +236,7 @@ export default { |
|
|
|
|
label: '额定工时(分钟)', |
|
|
|
|
prop: 'standardTime', |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
sortable: 'custom', |
|
|
|
|
span: 12, |
|
|
|
|
width: 180, |
|
|
|
|
labelWidth: 180, |
|
|
|
|
@ -251,7 +253,7 @@ export default { |
|
|
|
|
label: '准备工时(分钟)', |
|
|
|
|
prop: 'prepareTime', |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
sortable: 'custom', |
|
|
|
|
span: 12, |
|
|
|
|
width: 180, |
|
|
|
|
labelWidth: 180, |
|
|
|
|
@ -268,7 +270,7 @@ export default { |
|
|
|
|
label: '轮次间隔(分钟)', |
|
|
|
|
prop: 'interval', |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
sortable: 'custom', |
|
|
|
|
span: 12, |
|
|
|
|
width: 180, |
|
|
|
|
labelWidth: 180, |
|
|
|
|
@ -286,7 +288,7 @@ export default { |
|
|
|
|
label: '指定使用', |
|
|
|
|
prop: 'assignUse', |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
sortable: 'custom', |
|
|
|
|
span: 12, |
|
|
|
|
width: 120, |
|
|
|
|
}, |
|
|
|
|
@ -294,7 +296,7 @@ export default { |
|
|
|
|
label: '备注', |
|
|
|
|
prop: 'remarks', |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
sortable: 'custom', |
|
|
|
|
span: 12, |
|
|
|
|
width: 180, |
|
|
|
|
}, |
|
|
|
|
@ -314,7 +316,39 @@ export default { |
|
|
|
|
], // 存储合并行数的容器,格式:{workCenterName: [], equipName: [], equipCode: []} |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
|
...mapGetters(['permission']), |
|
|
|
|
}, |
|
|
|
|
created(){ |
|
|
|
|
this.option.delBtn = this.permission.equipmentCapacity_delete ? true : false; |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// 表格排序 |
|
|
|
|
sortChange({ prop, order }) { |
|
|
|
|
console.log('prop----------',prop) |
|
|
|
|
console.log('order----------',order) |
|
|
|
|
if (!prop) { |
|
|
|
|
// 如果取消排序,清空排序参数 |
|
|
|
|
this.query.orderByField = undefined; |
|
|
|
|
// this.query.isAsc = undefined; |
|
|
|
|
this.query.ascs = undefined; |
|
|
|
|
this.query.descs = undefined; |
|
|
|
|
} else { |
|
|
|
|
const orderByField = prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase(); |
|
|
|
|
if(order === 'ascending'){ |
|
|
|
|
this.query.ascs = orderByField; |
|
|
|
|
this.query.descs = undefined; |
|
|
|
|
}else{ |
|
|
|
|
this.query.descs = orderByField; |
|
|
|
|
this.query.ascs = undefined; |
|
|
|
|
} |
|
|
|
|
// this.query.orderByField = orderByField; |
|
|
|
|
// this.query.isAsc = order === 'ascending' ? true : false; |
|
|
|
|
// this.query.asc = order === 'ascending' ? true : false; |
|
|
|
|
} |
|
|
|
|
// // 重新加载数据 |
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
}, |
|
|
|
|
// 计算合并单元格的核心方法 |
|
|
|
|
calculateSpan(arr) { |
|
|
|
|
if (!arr || arr.length === 0) { |
|
|
|
|
|