lb #1

Merged
gtz217 merged 128 commits from lb into develop 2022-09-20 14:53:17 +08:00
Showing only changes of commit 3d851e4362 - Show all commits

View File

@ -64,19 +64,30 @@ const addOrUpdateConfigs = {
{ name: 'code', label: '设备编码' },
{ name: 'enName', label: '英文名称' },
{ name: 'abbr', label: '缩写' },
{ name: 'equipmentTypeId', label: '设备类型', type: 'select', options: [] },
{ name: 'groupId', label: '设备分组', required: true, type: 'select', options: [{ label: 1, value: 1 }] },
{ name: 'equipmentTypeId', label: '设备类型', required: true, type: 'select', options: [] },
{ name: 'groupId', label: '设备分组', required: true, type: 'select', options: [] },
{ name: 'productionTime', label: '生产日期' },
{ name: 'enterTime', label: '进厂日期' },
{ name: 'tvalue', label: '设备TT值', required: true },
{ name: 'processingTime', label: '单件产品加工时间' },
{ name: 'manufacturer', label: '制造商' },
{ name: 'spec', label: '设备规格' },
{ name: 'remark', label: '备注 ', span: 24 }
{
name: 'dataType',
label: '数据类别',
required: true,
type: 'select',
options: [
{ value: 0, label: '无类别' },
{ value: 1, label: '上片数据设备' },
{ value: 2, label: '下片数据设备' }
]
},
{ name: 'remark', label: '备注 ' }
],
// TODO:
// TODO:
// TODO:
// TODO:
// TODO:
// TODO:
extraComponents: [
{
name: 'description',
@ -129,8 +140,8 @@ const addOrUpdateConfigs = {
],
operations: [
{ name: 'cancel', showAlways: true },
{ name: 'save', url: '/monitoring/equipmentGroup', permission: '', showOnEdit: false },
{ name: 'update', url: '/monitoring/equipmentGroup', permission: '', showOnEdit: true }
{ name: 'save', url: '/monitoring/equipment', permission: '', showOnEdit: false },
{ name: 'update', url: '/monitoring/equipment', permission: '', showOnEdit: true }
]
}
@ -158,8 +169,40 @@ export default {
activated() {
console.log('activated')
this.getDataList()
this.getGroupList()
this.getTypeList()
},
methods: {
//
getTypeList() {
this.$http({
url: this.$http.adornUrl('/monitoring/equipmentType/page'),
method: 'get',
params: this.$http.adornParams({
// page: this.pageIndex,
// limit: this.pageSize,
// key: this.dataForm.key
})
}).then(({ data }) => {
const eqTypeConfig = this.addOrUpdateConfigs.fields.find(item => item.name === 'equipmentTypeId')
eqTypeConfig.options = data.data?.list?.map(item => ({ value: item.id, label: item.name })) || []
})
},
//
getGroupList() {
this.$http({
url: this.$http.adornUrl('/monitoring/equipmentGroup/page'),
method: 'get',
params: this.$http.adornParams({
// page: this.pageIndex,
// limit: this.pageSize,
// key: this.dataForm.key
})
}).then(({ data }) => {
const groupConfig = this.addOrUpdateConfigs.fields.find(item => item.name === 'groupId')
groupConfig.options = data.data?.list?.map(item => ({ value: item.id, label: item.name })) || []
})
},
//
getDataList() {
this.dataListLoading = true