43 lines
1.6 KiB
JavaScript
43 lines
1.6 KiB
JavaScript
|
|
||
|
class ReportArt{
|
||
|
constructor(params) {
|
||
|
if(!params){
|
||
|
params = {};
|
||
|
}
|
||
|
this.artworkId = params.id || null;//艺术品id、
|
||
|
this.artworkOldName = params.oldName || "无";//艺术品原名
|
||
|
this.author = params.author || "无";//作者
|
||
|
this.createPeriod = params.createPeriod || "无";//创作年代
|
||
|
this.materialName = params.materialName || "无";//材质
|
||
|
this.artworkImages = params.artworkImages || "";//艺术品图片
|
||
|
this.actualNumber=params.actualNumber || 1;//数量
|
||
|
this.shippingContainerType = [];//包装类型
|
||
|
this.packingMaterials = [];//填充物
|
||
|
this.transportPurpose = [];//运输目的
|
||
|
}
|
||
|
|
||
|
setAttribute(art){
|
||
|
this.artworkId = art.artworkRecordId || null;//艺术品id、
|
||
|
this.artworkOldName = art.artworkOldName || "无";//艺术品原名
|
||
|
this.author = art.author || "无";//作者
|
||
|
this.createPeriod = art.createPeriod || "无";//创作年代
|
||
|
this.materialName = art.materialName || "无";//材质
|
||
|
this.artworkImages = art.artworkImages || "";//艺术品图片
|
||
|
this.actualNumber=art.actualNumber || 1;//数量
|
||
|
|
||
|
if(art.transportPurpose.length > 0){
|
||
|
this.transportPurpose = art.transportPurpose;
|
||
|
}
|
||
|
if(art.shippingContainerType.length > 0){
|
||
|
this.shippingContainerType =art.shippingContainerType;
|
||
|
}
|
||
|
if(art.packingMaterials.length > 0){
|
||
|
this.packingMaterials = art.packingMaterials;
|
||
|
}
|
||
|
}
|
||
|
setMaterials(val){
|
||
|
this.materials = val;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export default ReportArt
|