update dialog: 多上传组件上传成功
This commit is contained in:
parent
23e508916e
commit
3d851e4362
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user