parent
9b37f8792a
commit
201352d12e
2 changed files with 350 additions and 0 deletions
@ -0,0 +1,303 @@ |
|||||||
|
<template> |
||||||
|
<basic-container> |
||||||
|
<avue-crud |
||||||
|
:option="option" |
||||||
|
:table-loading="loading" |
||||||
|
:data="data" |
||||||
|
v-model="form" |
||||||
|
v-model:page="page" |
||||||
|
ref="crud" |
||||||
|
@row-del="rowDel" |
||||||
|
@row-update="rowUpdate" |
||||||
|
@row-save="rowSave" |
||||||
|
@search-change="searchChange" |
||||||
|
@search-reset="searchReset" |
||||||
|
@selection-change="selectionChange" |
||||||
|
@current-change="currentChange" |
||||||
|
@size-change="sizeChange" |
||||||
|
@refresh-change="refreshChange" |
||||||
|
@on-load="onLoad" |
||||||
|
> |
||||||
|
<template #menu-left> </template> |
||||||
|
<template #menu-right> </template> |
||||||
|
<template #menu="{ row }"> </template> |
||||||
|
|
||||||
|
<template #heatTreat="scope"> </template> |
||||||
|
</avue-crud> |
||||||
|
</basic-container> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script> |
||||||
|
import { |
||||||
|
getListSintTempCurve, |
||||||
|
removeSintTempCurve, |
||||||
|
addSintTempCurve, |
||||||
|
updateSintTempCurve, |
||||||
|
} from '@/api/productionSchedulingPlan/basic'; |
||||||
|
export default { |
||||||
|
components: {}, |
||||||
|
data() { |
||||||
|
return { |
||||||
|
form: {}, |
||||||
|
selectionList: [], |
||||||
|
query: {}, |
||||||
|
loading: false, |
||||||
|
page: { |
||||||
|
pageSize: 10, |
||||||
|
currentPage: 1, |
||||||
|
total: 0, |
||||||
|
}, |
||||||
|
option: { |
||||||
|
columnSort: true, |
||||||
|
tip: false, |
||||||
|
height: 'auto', |
||||||
|
calcHeight: 32, |
||||||
|
simplePage: false, |
||||||
|
searchShow: true, |
||||||
|
searchMenuSpan: 6, |
||||||
|
searchIcon: true, |
||||||
|
searchIndex: 3, |
||||||
|
tree: false, |
||||||
|
border: true, |
||||||
|
index: true, |
||||||
|
selection: false, |
||||||
|
addBtn: true, |
||||||
|
editBtn: true, |
||||||
|
viewBtn: false, |
||||||
|
delBtn: true, |
||||||
|
editBtnText: '修改', |
||||||
|
labelWidth: 120, |
||||||
|
menuWidth: 120, |
||||||
|
dialogWidth: 900, |
||||||
|
dialogClickModal: false, |
||||||
|
searchEnter: true, |
||||||
|
excelBtn: false, |
||||||
|
filterBtn: true, |
||||||
|
searchShowBtn: false, |
||||||
|
excelBtn: true, |
||||||
|
showOverflowTooltip: true, |
||||||
|
addBtnIcon: ' ', |
||||||
|
viewBtnIcon: ' ', |
||||||
|
delBtnIcon: ' ', |
||||||
|
editBtnIcon: ' ', |
||||||
|
gridBtn: false, |
||||||
|
searchLabelPosition: 'left', |
||||||
|
searchGutter: 24, |
||||||
|
searchSpan: 6, |
||||||
|
menuAlign: 'left', |
||||||
|
gridBtn: false, |
||||||
|
searchMenuPosition: 'right', |
||||||
|
align: 'center', |
||||||
|
column: [ |
||||||
|
{ |
||||||
|
label: '工序', |
||||||
|
prop: 'processId', |
||||||
|
search: true, |
||||||
|
sortable: true, |
||||||
|
span: 12, |
||||||
|
type: 'select', |
||||||
|
filterable: true, |
||||||
|
dicUrl: '/blade-scheduling/processSet/findList', |
||||||
|
props: { |
||||||
|
label: 'name', |
||||||
|
value: 'id', |
||||||
|
}, |
||||||
|
change: (val, row) => { |
||||||
|
this.onChangeData(val.item, 'processId'); |
||||||
|
}, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '工序', |
||||||
|
prop: 'processName', |
||||||
|
search: false, |
||||||
|
sortable: true, |
||||||
|
span: 12, |
||||||
|
hide: true, |
||||||
|
display: false, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '设备编码', |
||||||
|
prop: 'equipCode', |
||||||
|
search: true, |
||||||
|
sortable: true, |
||||||
|
span: 12, |
||||||
|
width: 120, |
||||||
|
type: 'select', |
||||||
|
filterable: true, |
||||||
|
dicUrl: '/blade-scheduling/equipment/findList', |
||||||
|
props: { |
||||||
|
label: 'deviceCode', |
||||||
|
value: 'deviceCode', |
||||||
|
}, |
||||||
|
change: val => { |
||||||
|
this.onChangeData(val.item, 'equipName'); |
||||||
|
}, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '设备名称', |
||||||
|
prop: 'equipName', |
||||||
|
search: false, |
||||||
|
sortable: true, |
||||||
|
span: 12, |
||||||
|
width: 120, |
||||||
|
disabled: true, |
||||||
|
}, |
||||||
|
|
||||||
|
{ |
||||||
|
label: '设备分类', |
||||||
|
prop: 'equipType', |
||||||
|
search: false, |
||||||
|
sortable: true, |
||||||
|
span: 12, |
||||||
|
width: 120, |
||||||
|
type: 'select', |
||||||
|
dicData: [ |
||||||
|
{ |
||||||
|
label: '产线设备', |
||||||
|
value: '0', |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '普通设备', |
||||||
|
value: 1, |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '玻璃粉牌号', |
||||||
|
prop: 'glassCode', |
||||||
|
search: false, |
||||||
|
sortable: true, |
||||||
|
span: 12, |
||||||
|
hide: true, |
||||||
|
display: false, |
||||||
|
}, |
||||||
|
|
||||||
|
{ |
||||||
|
label: '设定温度', |
||||||
|
prop: 'temperature', |
||||||
|
search: false, |
||||||
|
sortable: true, |
||||||
|
span: 12, |
||||||
|
|
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '备注', |
||||||
|
prop: 'remarks', |
||||||
|
search: false, |
||||||
|
sortable: true, |
||||||
|
span: 12, |
||||||
|
|
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
|
||||||
|
data: [], |
||||||
|
}; |
||||||
|
}, |
||||||
|
methods: { |
||||||
|
onChangeData(val, type) { |
||||||
|
if (val && type == 'workCenterId') { |
||||||
|
this.form.workCenterName = val.wcCode; |
||||||
|
} |
||||||
|
if (val && type == 'equipName') { |
||||||
|
this.form.equipName = val.deviceName; |
||||||
|
} |
||||||
|
if (val && type == 'craftId') { |
||||||
|
this.form.craftName = val.caName; |
||||||
|
} |
||||||
|
if (val && type == 'processId') { |
||||||
|
this.form.processName = val.name; |
||||||
|
} |
||||||
|
}, |
||||||
|
rowSave(row, done, loading) { |
||||||
|
addSintTempCurve(row).then( |
||||||
|
() => { |
||||||
|
this.onLoad(this.page); |
||||||
|
this.$message({ |
||||||
|
type: 'success', |
||||||
|
message: '操作成功!', |
||||||
|
}); |
||||||
|
done(); |
||||||
|
}, |
||||||
|
error => { |
||||||
|
window.console.log(error); |
||||||
|
loading(); |
||||||
|
} |
||||||
|
); |
||||||
|
}, |
||||||
|
rowUpdate(row, index, done, loading) { |
||||||
|
updateSintTempCurve(row).then( |
||||||
|
() => { |
||||||
|
this.onLoad(this.page); |
||||||
|
this.$message({ |
||||||
|
type: 'success', |
||||||
|
message: '操作成功!', |
||||||
|
}); |
||||||
|
done(); |
||||||
|
}, |
||||||
|
error => { |
||||||
|
window.console.log(error); |
||||||
|
loading(); |
||||||
|
} |
||||||
|
); |
||||||
|
}, |
||||||
|
rowDel(row) { |
||||||
|
this.$confirm('确定将选择数据删除?', { |
||||||
|
confirmButtonText: '确定', |
||||||
|
cancelButtonText: '取消', |
||||||
|
type: 'warning', |
||||||
|
}) |
||||||
|
.then(() => { |
||||||
|
return removeSintTempCurve(row.id); |
||||||
|
}) |
||||||
|
.then(() => { |
||||||
|
this.onLoad(this.page); |
||||||
|
this.$message({ |
||||||
|
type: 'success', |
||||||
|
message: '操作成功!', |
||||||
|
}); |
||||||
|
}); |
||||||
|
}, |
||||||
|
|
||||||
|
searchReset() { |
||||||
|
this.query = {}; |
||||||
|
this.onLoad(this.page); |
||||||
|
}, |
||||||
|
searchChange(params, done) { |
||||||
|
this.query = params; |
||||||
|
this.page.currentPage = 1; |
||||||
|
this.onLoad(this.page, params); |
||||||
|
done(); |
||||||
|
}, |
||||||
|
selectionChange(list) { |
||||||
|
this.selectionList = list; |
||||||
|
}, |
||||||
|
selectionClear() { |
||||||
|
this.selectionList = []; |
||||||
|
this.$refs.crud.toggleSelection(); |
||||||
|
}, |
||||||
|
|
||||||
|
currentChange(currentPage) { |
||||||
|
this.page.currentPage = currentPage; |
||||||
|
}, |
||||||
|
sizeChange(pageSize) { |
||||||
|
this.page.pageSize = pageSize; |
||||||
|
}, |
||||||
|
refreshChange() { |
||||||
|
this.onLoad(this.page, this.query); |
||||||
|
}, |
||||||
|
onLoad(page, params = {}) { |
||||||
|
this.loading = true; |
||||||
|
getListSintTempCurve(page.currentPage, page.pageSize, Object.assign(params, this.query)).then( |
||||||
|
res => { |
||||||
|
this.data = res.data.data.records; |
||||||
|
this.loading = false; |
||||||
|
this.page.total = res.data.data.total; |
||||||
|
this.selectionClear(); |
||||||
|
} |
||||||
|
); |
||||||
|
}, |
||||||
|
}, |
||||||
|
mounted() {}, |
||||||
|
}; |
||||||
|
</script> |
||||||
Loading…
Reference in new issue