Merge branch 'dev-scheduling' of http://42.192.7.176:3000/suojin/jonhon-mes-web into dev-scheduling
commit
170e184f43
16 changed files with 1229 additions and 289 deletions
@ -0,0 +1,38 @@ |
||||
// 量具保养
|
||||
import request from '@/axios'; |
||||
|
||||
// 量具保养记录
|
||||
export const getRecorderList = (params) => { |
||||
return request({ |
||||
url: '/blade-desk/measuringUpkeep/page', |
||||
method: 'get', |
||||
params, |
||||
}); |
||||
}; |
||||
|
||||
// 量具保养新增列表数据
|
||||
export const addRecorderList = (params) => { |
||||
return request({ |
||||
url: '/blade-desk/measuringUpkeep/newlyAddedList', |
||||
method: 'get', |
||||
params, |
||||
}); |
||||
}; |
||||
|
||||
// 加入保养
|
||||
export const addRecorder = (params) => { |
||||
return request({ |
||||
url: '/blade-desk/measuringUpkeep/addMaintenance', |
||||
method: 'post', |
||||
params, |
||||
}); |
||||
}; |
||||
|
||||
// 量具保养申请
|
||||
export const applyRecorder = (params) => { |
||||
return request({ |
||||
url: '/blade-desk/measuringUpkeep/maintenanceAppFun', |
||||
method: 'post', |
||||
params, |
||||
}); |
||||
}; |
||||
@ -0,0 +1,11 @@ |
||||
// 计量记录
|
||||
import request from '@/axios'; |
||||
|
||||
// 计量记录列表
|
||||
export const getRecorderList = (params) => { |
||||
return request({ |
||||
url: '/blade-desk/measurementRecords/page', |
||||
method: 'get', |
||||
params, |
||||
}); |
||||
}; |
||||
@ -0,0 +1,47 @@ |
||||
// 提醒配置
|
||||
import request from '@/axios'; |
||||
|
||||
// 列表
|
||||
export const getList = (params) => { |
||||
return request({ |
||||
url: '/blade-desk/meteringRemindSet/page', |
||||
method: 'get', |
||||
params, |
||||
}); |
||||
}; |
||||
|
||||
// 新增
|
||||
export const addRemind = (data) => { |
||||
return request({ |
||||
url: '/blade-desk/meteringRemindSet/save', |
||||
method: 'post', |
||||
data, |
||||
}); |
||||
}; |
||||
|
||||
// 详情
|
||||
export const getDetail = (params) => { |
||||
return request({ |
||||
url: '/blade-desk/meteringRemindSet/detail', |
||||
method: 'get', |
||||
params, |
||||
}); |
||||
}; |
||||
|
||||
// 修改
|
||||
export const updateRemind = (data) => { |
||||
return request({ |
||||
url: '/blade-desk/meteringRemindSet/update', |
||||
method: 'post', |
||||
data, |
||||
}); |
||||
}; |
||||
|
||||
// 删除
|
||||
export const removeRemind = params => { |
||||
return request({ |
||||
url: '/blade-desk/meteringRemindSet/remove', |
||||
method: 'post', |
||||
params, |
||||
}); |
||||
}; |
||||
@ -0,0 +1,245 @@ |
||||
<template> |
||||
<el-dialog title="新增" append-to-body :modelValue="openShow" width="80%" @close="closeDialog" fullscreen> |
||||
<avue-crud :option="option" :table-loading="loading" :data="data" v-model="form" v-model:page="page" ref="crud" |
||||
@row-del="rowDel" @search-change="searchChange" @search-reset="searchReset" |
||||
@row-save="rowSave" @row-update="rowUpdate" :before-open="beforeOpen" |
||||
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" |
||||
@refresh-change="refreshChange" > |
||||
<template #menu-left> |
||||
<el-button type="danger" plain @click="removeFn">删除</el-button> |
||||
</template> |
||||
</avue-crud> |
||||
</el-dialog> |
||||
</template> |
||||
|
||||
<script> |
||||
import {getList,addRemind,getDetail,updateRemind,removeRemind} from "@/api/equiptManagement/reminderConfiguration" |
||||
export default { |
||||
props: { |
||||
showDialog: { |
||||
type: Boolean, |
||||
default: false |
||||
}, |
||||
moldAddMore: { |
||||
type: Boolean, |
||||
default: false |
||||
} |
||||
}, |
||||
data() { |
||||
return { |
||||
openShow:false, |
||||
loading:false, |
||||
data:[], |
||||
form:{}, |
||||
selectionList:[], |
||||
page:{ |
||||
pageSize: 10, |
||||
currentPage: 1, |
||||
total: 0, |
||||
}, |
||||
option:{ |
||||
columnSort: true, |
||||
tip: false, |
||||
height: 'auto', |
||||
calcHeight: 32, |
||||
simplePage: false, |
||||
searchShow: true, |
||||
searchMenuSpan: 6, |
||||
dialogWidth: 600, |
||||
border: true, |
||||
selection: true, |
||||
menuWidth: 120, |
||||
dialogClickModal: false, |
||||
excelBtn: true, |
||||
viewBtn: false, |
||||
addBtn: true, |
||||
editBtn: true, |
||||
editBtnText: '修改', |
||||
refreshBtn: false, |
||||
searchShowBtn: false, |
||||
gridBtn: false, |
||||
searchIndex: 3, |
||||
searchIcon: true, |
||||
menu: true, |
||||
searchLabelPosition: 'left', |
||||
searchLabelPosition: 'left', |
||||
searchGutter: 24, |
||||
searchSpan: 6, |
||||
menuAlign: 'left', |
||||
gridBtn: false, |
||||
searchMenuPosition: 'right', |
||||
addBtnIcon: ' ', |
||||
viewBtnIcon: ' ', |
||||
delBtnIcon: ' ', |
||||
editBtnIcon: ' ', |
||||
align: 'center', |
||||
|
||||
column: [ |
||||
{ |
||||
label: '类别', |
||||
prop: 'category', |
||||
type:'select', |
||||
span: 24, |
||||
search: true, |
||||
sortable: true, |
||||
overHidden: true, |
||||
// 1、仪表计量;2、设备计量 |
||||
dicData:[ |
||||
{label:"仪表计量",value:1}, |
||||
{label:"设备计量",value:2}, |
||||
], |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请选择类别', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '天数', |
||||
prop: 'days', |
||||
span: 24, |
||||
type: 'number', |
||||
sortable: true, |
||||
overHidden: true, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入天数', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '颜色', |
||||
prop: 'color', |
||||
type:'select', |
||||
span: 24, |
||||
search: true, |
||||
sortable: true, |
||||
overHidden: true, |
||||
dicData:[ |
||||
// 颜色1、黄色;2、浅红色 |
||||
{label:'黄色',value:1}, |
||||
{label:'浅红色',value:2}, |
||||
], |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请选择颜色', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
} |
||||
] |
||||
} |
||||
} |
||||
}, |
||||
mounted(){ |
||||
this.openShow = this.showDialog |
||||
this.onload() |
||||
}, |
||||
methods:{ |
||||
closeDialog(){ |
||||
this.openShow = false |
||||
this.$emit('closeDialog'); |
||||
}, |
||||
selectionChange(list){ |
||||
this.selectionList = list |
||||
}, |
||||
searchChange(params, done){ |
||||
this.page.currentPage = 1 |
||||
this.query = params |
||||
this.onload() |
||||
done() |
||||
}, |
||||
searchReset(){ |
||||
this.query = {} |
||||
this.onload() |
||||
}, |
||||
currentChange(currentPage){ |
||||
this.page.currentPage = currentPage |
||||
}, |
||||
sizeChange(pageSize){ |
||||
this.page.pageSize = pageSize |
||||
}, |
||||
beforeOpen(done, type){ |
||||
// if(['edit', 'view'].includes(type)){ |
||||
// getDetail({id:this.form.id}).then(res =>{ |
||||
// console |
||||
// }) |
||||
// } |
||||
done() |
||||
}, |
||||
rowSave(row, done, loading){ |
||||
addRemind(row).then(res =>{ |
||||
if(res.data.code == 200){ |
||||
this.$message.success('新增成功') |
||||
done() |
||||
this.onload() |
||||
} |
||||
}) |
||||
}, |
||||
rowUpdate(row, index, done, loading){ |
||||
updateRemind(row).then(res =>{ |
||||
if(res.data.code == 200){ |
||||
this.$message.success('修改成功') |
||||
done() |
||||
this.onload() |
||||
} |
||||
}) |
||||
}, |
||||
rowDel(row){ |
||||
this.$confirm('确定删除数据吗?', { |
||||
confirmButtonText: '确定', |
||||
cancelButtonText: '取消', |
||||
type: 'warning', |
||||
}).then(() => { |
||||
removeRemind({ids:row.id}).then(res =>{ |
||||
if(res.data.code == 200){ |
||||
this.$message.success('删除成功') |
||||
this.onload() |
||||
} |
||||
}) |
||||
}) |
||||
}, |
||||
removeFn(){ |
||||
if(this.selectionList.length == 0){ |
||||
this.$message.error('请至少选择一条数据') |
||||
return |
||||
} |
||||
this.$confirm('确定删除选中数据吗?', { |
||||
confirmButtonText: '确定', |
||||
cancelButtonText: '取消', |
||||
type: 'warning', |
||||
}).then(() => { |
||||
removeRemind({ |
||||
ids:this.selectionList.map(item => item.id).join(',') |
||||
}).then(res =>{ |
||||
if(res.data.code == 200){ |
||||
this.$message.success('删除成功') |
||||
this.onload() |
||||
} |
||||
}) |
||||
}) |
||||
}, |
||||
onload(){ |
||||
this.loading = true |
||||
getList({ |
||||
current:this.page.currentPage, |
||||
size:this.page.pageSize, |
||||
...this.query |
||||
}).then(res => { |
||||
this.data = res.data.data.records |
||||
this.page.total = res.data.data.total |
||||
this.loading = false |
||||
}) |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style> |
||||
|
||||
</style> |
||||
Loading…
Reference in new issue