1、格式化
2、档案尺寸结构调整
This commit is contained in:
parent
9bb82d3e22
commit
d477c36d9b
274
ReportBase.js
274
ReportBase.js
@ -1,160 +1,160 @@
|
||||
import { formatterDate } from "@/utils/date";
|
||||
import { formatterDate } from '@/utils/date';
|
||||
|
||||
class ReportBase {
|
||||
constructor(params) {
|
||||
if (!params) {
|
||||
params = {};
|
||||
}
|
||||
this.documentNumber = formatterDate(new Date(), "YYYYMMDDHHmmss");
|
||||
this.reportName = params.reportName || null;
|
||||
this.checkDate = params.checkDate || new Date().getTime();
|
||||
this.checkLocation = params.checkLocation || "";
|
||||
this.checkLocationGeometry = params.checkLocationGeometry || null; //geometry格式
|
||||
constructor(params) {
|
||||
if (!params) {
|
||||
params = {};
|
||||
}
|
||||
this.documentNumber = formatterDate(new Date(), 'YYYYMMDDHHmmss');
|
||||
this.reportName = params.reportName || null;
|
||||
this.checkDate = params.checkDate || new Date().getTime();
|
||||
this.checkLocation = params.checkLocation || ''; //目的地详细地址
|
||||
this.checkLocationGeometry = params.checkLocationGeometry || null; //geometry格式
|
||||
|
||||
this.checkBy = params.checkBy || "";
|
||||
this.reportBy = params.reportBy || "";
|
||||
this.coverImage = params.coverImage; //报告封面图
|
||||
this.conditionTypes = [];
|
||||
this.checkBy = params.checkBy || '';
|
||||
this.reportBy = params.reportBy || '';
|
||||
this.coverImage = params.coverImage; //报告封面图
|
||||
this.conditionTypes = [];
|
||||
|
||||
this.conditionImageList = []; // 状况分析详情图{title,description,image}
|
||||
this.conditionMapping = []; //状况图对象数组 {original,graphing,superposition,legend} legend包含{key,desc,color}
|
||||
this.grids = {
|
||||
gridsNumber: 4,
|
||||
gridsImgs: [],
|
||||
};
|
||||
this.conservation = params.conservation || null;
|
||||
this.suggest = params.suggest || null;
|
||||
this.environmentTemperature = params.environmentTemperature || null; //不带单位
|
||||
this.environmentHumidity = params.environmentHumidity || null; //不带单位
|
||||
this.logo = null;
|
||||
// this.coverLogo = `${window.GLOBAL["BASE_URL"]}/AppTemplate/conditionReport/images/reportLogo.png`;
|
||||
// this.organizationName = params.organizationName;
|
||||
// this.organizationEmail = 'ja.atelier@hotmail.com';
|
||||
// this.organizationPhone = '+86-13911819084 / +33 (0)7.82.15.72.97';
|
||||
// this.signatureInfo = {
|
||||
// "weChatImg": `${window.GLOBAL["BASE_URL"]}/AppTemplate/conditionReport/images/erm.png`,
|
||||
// "signer": "Jia Peng",
|
||||
// "signerInfo":"Conservator - Restorer of the cultural heritage recognized by the Direction of the museums of France (D.M.F)\n" +
|
||||
// "Professor of Conservation-Restoration & Material research of Art of Guangzhou Academy of Fine Art (GAFA)\n" +
|
||||
// "Director of Guangdong Provincial Key Laboratory of Conservation-Restoration & Materials Research of Artworks"
|
||||
// }
|
||||
}
|
||||
|
||||
setAttribute(reportBase) {
|
||||
if (!reportBase) {
|
||||
return;
|
||||
}
|
||||
if (reportBase.documentNumber) {
|
||||
this.documentNumber = reportBase.documentNumber;
|
||||
}
|
||||
if (reportBase.checkDate) {
|
||||
this.checkDate = reportBase.checkDate;
|
||||
this.conditionImageList = []; // 状况分析详情图{title,description,image}
|
||||
this.conditionMapping = []; //状况图对象数组 {original,graphing,superposition,legend} legend包含{key,desc,color}
|
||||
this.grids = {
|
||||
gridsNumber: 4,
|
||||
gridsImgs: [],
|
||||
};
|
||||
this.conservation = params.conservation || null;
|
||||
this.suggest = params.suggest || null;
|
||||
this.environmentTemperature = params.environmentTemperature || null; //不带单位
|
||||
this.environmentHumidity = params.environmentHumidity || null; //不带单位
|
||||
this.logo = null;
|
||||
// this.coverLogo = `${window.GLOBAL["BASE_URL"]}/AppTemplate/conditionReport/images/reportLogo.png`;
|
||||
// this.organizationName = params.organizationName;
|
||||
// this.organizationEmail = 'ja.atelier@hotmail.com';
|
||||
// this.organizationPhone = '+86-13911819084 / +33 (0)7.82.15.72.97';
|
||||
// this.signatureInfo = {
|
||||
// "weChatImg": `${window.GLOBAL["BASE_URL"]}/AppTemplate/conditionReport/images/erm.png`,
|
||||
// "signer": "Jia Peng",
|
||||
// "signerInfo":"Conservator - Restorer of the cultural heritage recognized by the Direction of the museums of France (D.M.F)\n" +
|
||||
// "Professor of Conservation-Restoration & Material research of Art of Guangzhou Academy of Fine Art (GAFA)\n" +
|
||||
// "Director of Guangdong Provincial Key Laboratory of Conservation-Restoration & Materials Research of Artworks"
|
||||
// }
|
||||
}
|
||||
|
||||
this.reportName = reportBase.reportName;
|
||||
setAttribute(reportBase) {
|
||||
if (!reportBase) {
|
||||
return;
|
||||
}
|
||||
if (reportBase.documentNumber) {
|
||||
this.documentNumber = reportBase.documentNumber;
|
||||
}
|
||||
if (reportBase.checkDate) {
|
||||
this.checkDate = reportBase.checkDate;
|
||||
}
|
||||
|
||||
this.checkLocation = reportBase.checkLocation;
|
||||
this.reportName = reportBase.reportName;
|
||||
|
||||
this.checkBy = reportBase.checkBy;
|
||||
this.checkLocation = reportBase.checkLocation;
|
||||
|
||||
this.reportBy = reportBase.reportBy;
|
||||
if (reportBase.coverImage) {
|
||||
this.coverImage = reportBase.coverImage;
|
||||
}
|
||||
if (reportBase.conservation) {
|
||||
this.conservation = reportBase.conservation;
|
||||
}
|
||||
if (reportBase.suggest) {
|
||||
this.suggest = reportBase.suggest;
|
||||
}
|
||||
if (reportBase.grids) {
|
||||
//宫格图
|
||||
this.grids = reportBase.grids;
|
||||
}
|
||||
if (reportBase.conditionMapping) {
|
||||
this.conditionMapping = reportBase.conditionMapping;
|
||||
this.checkBy = reportBase.checkBy;
|
||||
|
||||
this.reportBy = reportBase.reportBy;
|
||||
if (reportBase.coverImage) {
|
||||
this.coverImage = reportBase.coverImage;
|
||||
}
|
||||
if (reportBase.conservation) {
|
||||
this.conservation = reportBase.conservation;
|
||||
}
|
||||
if (reportBase.suggest) {
|
||||
this.suggest = reportBase.suggest;
|
||||
}
|
||||
if (reportBase.grids) {
|
||||
//宫格图
|
||||
this.grids = reportBase.grids;
|
||||
}
|
||||
if (reportBase.conditionMapping) {
|
||||
this.conditionMapping = reportBase.conditionMapping;
|
||||
}
|
||||
|
||||
if (reportBase.conditionTypes) {
|
||||
this.conditionTypes = reportBase.conditionTypes;
|
||||
}
|
||||
if (reportBase.conditionImageList) {
|
||||
this.conditionImageList = reportBase.conditionImageList;
|
||||
}
|
||||
|
||||
this.checkLocationGeometry = reportBase.checkLocationGeometry || null; //geometry格式
|
||||
this.environmentTemperature = reportBase.environmentTemperature || null;
|
||||
this.environmentHumidity = reportBase.environmentHumidity || null;
|
||||
}
|
||||
|
||||
if (reportBase.conditionTypes) {
|
||||
this.conditionTypes = reportBase.conditionTypes;
|
||||
}
|
||||
if (reportBase.conditionImageList) {
|
||||
this.conditionImageList = reportBase.conditionImageList;
|
||||
setReportBy(val) {
|
||||
this.reportBy = val;
|
||||
}
|
||||
|
||||
this.checkLocationGeometry = reportBase.checkLocationGeometry || null; //geometry格式
|
||||
this.environmentTemperature = reportBase.environmentTemperature || null;
|
||||
this.environmentHumidity = reportBase.environmentHumidity || null;
|
||||
}
|
||||
setCoverImage(imageSrc) {
|
||||
this.coverImage = imageSrc;
|
||||
}
|
||||
|
||||
setReportBy(val) {
|
||||
this.reportBy = val;
|
||||
}
|
||||
setConditionTypes(val) {
|
||||
this.conditionTypes = val || [];
|
||||
}
|
||||
|
||||
setCoverImage(imageSrc) {
|
||||
this.coverImage = imageSrc;
|
||||
}
|
||||
setConditionImageList(fileList) {
|
||||
this.conditionImageList = fileList;
|
||||
}
|
||||
|
||||
setConditionTypes(val) {
|
||||
this.conditionTypes = val || [];
|
||||
}
|
||||
|
||||
setConditionImageList(fileList) {
|
||||
this.conditionImageList = fileList;
|
||||
}
|
||||
|
||||
/* setImagesLegend(imgSrc, legend) {
|
||||
/* setImagesLegend(imgSrc, legend) {
|
||||
this.conditionMapping["images"] = imgSrc;
|
||||
this.conditionMapping["legend"] = legend;
|
||||
}*/
|
||||
setConditionMapping(items) {
|
||||
this.conditionMapping = items;
|
||||
}
|
||||
setConservation(val) {
|
||||
this.conservation = val;
|
||||
}
|
||||
|
||||
setSuggest(val) {
|
||||
this.suggest = val;
|
||||
}
|
||||
|
||||
setLogo(val) {
|
||||
this.logo = window.GLOBAL["BASE_URL"] + val;
|
||||
}
|
||||
|
||||
setCoverLogo(val) {
|
||||
this.coverLogo = val;
|
||||
}
|
||||
|
||||
setOrgName(val) {
|
||||
this.organizationName = val;
|
||||
}
|
||||
|
||||
setOrgEmail(val) {
|
||||
this.organizationEmail = val;
|
||||
}
|
||||
|
||||
setOrgPhone(val) {
|
||||
this.organizationPhone = val;
|
||||
}
|
||||
|
||||
setGrids(gridNumber, girdList) {
|
||||
this.grids["gridsNumber"] = gridNumber;
|
||||
this.grids["gridsImgs"] = girdList;
|
||||
}
|
||||
|
||||
setCheckLocation(checkLocation) {
|
||||
this.checkLocation = checkLocation;
|
||||
}
|
||||
|
||||
setCheckLocationGeometry(geometry) {
|
||||
if (geometry) {
|
||||
this.checkLocationGeometry = {
|
||||
type: "Point",
|
||||
coordinates: geometry.coordinates,
|
||||
};
|
||||
setConditionMapping(items) {
|
||||
this.conditionMapping = items;
|
||||
}
|
||||
setConservation(val) {
|
||||
this.conservation = val;
|
||||
}
|
||||
|
||||
setSuggest(val) {
|
||||
this.suggest = val;
|
||||
}
|
||||
|
||||
setLogo(val) {
|
||||
this.logo = window.GLOBAL['BASE_URL'] + val;
|
||||
}
|
||||
|
||||
setCoverLogo(val) {
|
||||
this.coverLogo = val;
|
||||
}
|
||||
|
||||
setOrgName(val) {
|
||||
this.organizationName = val;
|
||||
}
|
||||
|
||||
setOrgEmail(val) {
|
||||
this.organizationEmail = val;
|
||||
}
|
||||
|
||||
setOrgPhone(val) {
|
||||
this.organizationPhone = val;
|
||||
}
|
||||
|
||||
setGrids(gridNumber, girdList) {
|
||||
this.grids['gridsNumber'] = gridNumber;
|
||||
this.grids['gridsImgs'] = girdList;
|
||||
}
|
||||
|
||||
setCheckLocation(checkLocation) {
|
||||
this.checkLocation = checkLocation;
|
||||
}
|
||||
|
||||
setCheckLocationGeometry(geometry) {
|
||||
if (geometry) {
|
||||
this.checkLocationGeometry = {
|
||||
type: 'Point',
|
||||
coordinates: geometry.coordinates,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default ReportBase;
|
||||
|
@ -20,9 +20,7 @@ class CellsysArt {
|
||||
this.textureName = params.texture_name; //材质名称
|
||||
this.countryId = params.country_id;
|
||||
this.countryName = params.country_name;
|
||||
this.length = params.length;
|
||||
this.width = params.width;
|
||||
this.height = params.height;
|
||||
|
||||
this.categoryOne = params.category_one;
|
||||
this.categoryOneName = params.category_one_name;
|
||||
this.categoryTwo = params.category_two;
|
||||
@ -50,6 +48,7 @@ class CellsysArt {
|
||||
}
|
||||
this.materialIds = params.material_ids; //材料Id数组
|
||||
this.geometry = params.geometry; //当前位置
|
||||
this.size = params.size || [];
|
||||
}
|
||||
get oldNameFormat() {
|
||||
//带书名号
|
||||
@ -224,4 +223,14 @@ class CellsysArt {
|
||||
}
|
||||
}
|
||||
|
||||
class ArtSize {
|
||||
constructor(params = {}) {
|
||||
let { name, width, length, height } = params;
|
||||
this.name = name;
|
||||
this.length = length;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
}
|
||||
}
|
||||
export { ArtSize };
|
||||
export default CellsysArt;
|
||||
|
@ -2,6 +2,7 @@ import { EditTask, Query, QueryTask } from './artUtil.js';
|
||||
import { artApi } from './artApi';
|
||||
import { formatterMillisecond } from './utils/date';
|
||||
import { godownEntryStatus } from './artEnum';
|
||||
import CellsysArt from './cellsysArt';
|
||||
|
||||
//入库记录
|
||||
class GodownEntry {
|
||||
@ -40,27 +41,18 @@ class GodownEntry {
|
||||
this.contractorSignatureImage = params.contractor_signature_image || null; //接收方签名
|
||||
let artworkRecord = params.artwork_record;
|
||||
if (artworkRecord) {
|
||||
this.artworkRecord = {
|
||||
recordNumber: artworkRecord.record_number,
|
||||
this.artworkRecord = new CellsysArt({
|
||||
id: this.artworkRecordId,
|
||||
record_number: artworkRecord.record_number,
|
||||
author: artworkRecord.author,
|
||||
oldName: artworkRecord.old_name,
|
||||
createPeriod: artworkRecord.create_period || '未知',
|
||||
width: artworkRecord.width,
|
||||
height: artworkRecord.height,
|
||||
length: artworkRecord.length,
|
||||
materialId: artworkRecord.material_id,
|
||||
};
|
||||
old_name: artworkRecord.old_name,
|
||||
create_period: artworkRecord.create_period,
|
||||
material_id: artworkRecord.material_id,
|
||||
});
|
||||
} else {
|
||||
this.artworkRecord = {
|
||||
recordNumber: null,
|
||||
author: null,
|
||||
oldName: null,
|
||||
createPeriod: null,
|
||||
width: null,
|
||||
height: null,
|
||||
length: null,
|
||||
materialId: null,
|
||||
};
|
||||
this.artworkRecord = new CellsysArt({
|
||||
id: this.artworkRecordId,
|
||||
});
|
||||
}
|
||||
}
|
||||
get statusMsg() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user