fix:页面bug修改
This commit is contained in:
@@ -164,7 +164,7 @@
|
||||
:options="options.fieldGroupOptions"
|
||||
:props="labelCascProp"
|
||||
class="hide-input"
|
||||
popper-class="prevent-clickoutside"
|
||||
popper-class="prevent-clickoutside limit-height"
|
||||
size="small"
|
||||
@change="addLabel"
|
||||
></el-cascader>
|
||||
@@ -398,28 +398,34 @@ export default {
|
||||
if (this.options.parentAssetOptions.length === 0) {
|
||||
this.getParentAsset().then(res => {
|
||||
const asset = this.options.parentAssetOptions.find(a => a.id === n)
|
||||
console.log(asset, 1)
|
||||
if (asset) {
|
||||
this.editAsset.brandId = asset.brand.id
|
||||
this.editAsset.modelId = asset.model.id
|
||||
this.editAsset.dcId = asset.dc.id
|
||||
this.editAsset.cabinetId = asset.cabinet.id
|
||||
this.editAsset.brandId = asset.brand ? asset.brand.id : ''
|
||||
this.editAsset.modelId = asset.model ? asset.model.id : ''
|
||||
this.editAsset.dcId = asset.dc ? asset.dc.id : ''
|
||||
this.editAsset.cabinetId = asset.cabinet ? asset.cabinet.id : ''
|
||||
this.editAsset.cabinetStart = asset.cabinetStart
|
||||
this.editAsset.cabinetEnd = asset.cabinetEnd
|
||||
|
||||
if(!asset.cabinet){
|
||||
asset.cabinet= {}
|
||||
}
|
||||
this.lockModelInputValue = `${asset.brand.name} / ${asset.model.name}`
|
||||
this.lockLocationInputValue = `${asset.dc.name} / ${asset.cabinet.name} / ${asset.cabinetStart}-${asset.cabinetEnd}`
|
||||
}
|
||||
})
|
||||
} else {
|
||||
const asset = this.options.parentAssetOptions.find(a => a.id === n)
|
||||
console.log(asset, 2)
|
||||
if (asset) {
|
||||
this.editAsset.brandId = asset.brand.id
|
||||
this.editAsset.modelId = asset.model.id
|
||||
this.editAsset.dcId = asset.dc.id
|
||||
this.editAsset.cabinetId = asset.cabinet.id
|
||||
this.editAsset.brandId = asset.brand ? asset.brand.id : ''
|
||||
this.editAsset.modelId = asset.model ? asset.model.id : ''
|
||||
this.editAsset.dcId = asset.dc ? asset.dc.id : ''
|
||||
this.editAsset.cabinetId = asset.cabinet ? asset.cabinet.id : ''
|
||||
this.editAsset.cabinetStart = asset.cabinetStart
|
||||
this.editAsset.cabinetEnd = asset.cabinetEnd
|
||||
|
||||
if(!asset.cabinet){
|
||||
asset.cabinet= {}
|
||||
}
|
||||
this.lockModelInputValue = `${asset.brand.name} / ${asset.model.name}`
|
||||
this.lockLocationInputValue = `${asset.dc.name} / ${asset.cabinet.name} / ${asset.cabinetStart}-${asset.cabinetEnd}`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user