update dialog: 多上传组件上传成功

This commit is contained in:
g7hoo 2022-08-16 15:01:33 +08:00
parent 23e508916e
commit 3d851e4362

View File

@ -64,19 +64,30 @@ const addOrUpdateConfigs = {
{ name: 'code', label: '设备编码' }, { name: 'code', label: '设备编码' },
{ name: 'enName', label: '英文名称' }, { name: 'enName', label: '英文名称' },
{ name: 'abbr', label: '缩写' }, { name: 'abbr', label: '缩写' },
{ name: 'equipmentTypeId', label: '设备类型', type: 'select', options: [] }, { name: 'equipmentTypeId', label: '设备类型', required: true, type: 'select', options: [] },
{ name: 'groupId', label: '设备分组', required: true, type: 'select', options: [{ label: 1, value: 1 }] }, { name: 'groupId', label: '设备分组', required: true, type: 'select', options: [] },
{ name: 'productionTime', label: '生产日期' }, { name: 'productionTime', label: '生产日期' },
{ name: 'enterTime', label: '进厂日期' }, { name: 'enterTime', label: '进厂日期' },
{ name: 'tvalue', label: '设备TT值', required: true }, { name: 'tvalue', label: '设备TT值', required: true },
{ name: 'processingTime', label: '单件产品加工时间' }, { name: 'processingTime', label: '单件产品加工时间' },
{ name: 'manufacturer', label: '制造商' }, { name: 'manufacturer', label: '制造商' },
{ name: 'spec', 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: [ extraComponents: [
{ {
name: 'description', name: 'description',
@ -129,8 +140,8 @@ const addOrUpdateConfigs = {
], ],
operations: [ operations: [
{ name: 'cancel', showAlways: true }, { name: 'cancel', showAlways: true },
{ name: 'save', url: '/monitoring/equipmentGroup', permission: '', showOnEdit: false }, { name: 'save', url: '/monitoring/equipment', permission: '', showOnEdit: false },
{ name: 'update', url: '/monitoring/equipmentGroup', permission: '', showOnEdit: true } { name: 'update', url: '/monitoring/equipment', permission: '', showOnEdit: true }
] ]
} }
@ -158,8 +169,40 @@ export default {
activated() { activated() {
console.log('activated') console.log('activated')
this.getDataList() this.getDataList()
this.getGroupList()
this.getTypeList()
}, },
methods: { 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() { getDataList() {
this.dataListLoading = true this.dataListLoading = true