This commit is contained in:
ag 2024-12-30 09:53:02 +08:00
parent 5ccee92f8f
commit 88abdbc51f
5 changed files with 82 additions and 18 deletions

View File

@ -18,12 +18,10 @@ class ReportBase {
this.conditionTypes = [];
this.conditionInfo = null; //状况类型补充说明
this.conditionImageList = []; // 局部详情图{title,description,image}
this.conditionMapping = [];
this.conditionMapping = {};
this.grids = {
gridsNumber: 4,
gridsImgs: [
],
gridsImgs: [],
};
this.conservation = params.conservation || null;
this.suggest = params.suggest || null;
@ -62,6 +60,7 @@ class ReportBase {
this.consignor = reportBase.consignor;
this.checkBy = reportBase.checkBy;
this.reportBy = reportBase.reportBy;
if (reportBase.coverImage) {
this.coverImage = reportBase.coverImage;
@ -75,9 +74,24 @@ class ReportBase {
if (reportBase.grids) {//宫格图
this.grids = reportBase.grids;
}
if (reportBase.conditionMapping) {
if (reportBase.conditionMapping.images) {
this.conditionMapping['images'] = reportBase.conditionMapping.images;
}
if (reportBase.conditionMapping.legend) {
this.conditionMapping['legend'] = reportBase.conditionMapping.legend;
}
}
if (reportBase.conditionTypes) {
this.conditionTypes = reportBase.conditionTypes;
}
if (reportBase.conditionImageList) {
this.conditionImageList = reportBase.conditionImageList;
}
if (reportBase.conditionInfo) {
this.conditionInfo = reportBase.conditionInfo;
}
this.checkLocationGeometry = reportBase.checkLocationGeometry || null; //geometry格式
this.environmentTemperature = reportBase.environmentTemperature || null;
this.environmentHumidity = reportBase.environmentHumidity || null;
@ -109,10 +123,6 @@ class ReportBase {
this.conditionMapping['legend'] = legend;
}
setImages(imgSrc) {
this.conditionMapping = imgSrc;
}
setConservation(val) {
this.conservation = val;

View File

@ -31,6 +31,7 @@ const artApi = {
conditionCheckUpdate: "/rpc/conditionCheckUpdate", //修改状况检查
conditionCheckDelete: "/rpc/conditionCheckDelete",//删除状况检查
viewConditionCheck: "/rpc/viewConditionCheck",//查询状况检查
viewRepairRecord:"/rpc/viewRepairRecord" //查询修复档案列表
};
export { artApi };

12
artRepairFile.js Normal file
View File

@ -0,0 +1,12 @@
class ArtRepairFile {
constructor(params={}) {
this.id = params.id;
this.name = params.name;
this.description = params.description;
this.conditionCheckId = params.condition_check_id; //关联的状况检查记录id
this.artworkRecordId = params.artwork_record_id; //关联的艺术品id
}
}
export default ArtRepairFile

View File

@ -5,6 +5,7 @@ import CellsysArt from './cellsysArt';
import CellsysEventType from '@airkoon/cellsys/cellsysEventType';
import ArtCounty from './artCounty';
import { EditTask } from '@airkoon/cellsys/cellsysUtil';
import ArtRepairFile from "./artRepairFile";
class ArtSystem {
constructor(orgId) { }
@ -280,6 +281,41 @@ class ArtSystem {
});
});
}
//查询系统修复档案列表
static queryRepairFiles(params){
let query = new Query();
let { filter,pageInfo } = params;
if (filter) {
filter.forEach((item) => {
query.addFilter(item['field'], item['operator'], item['value']);
});
}
let queryTask = new QueryTask(artApi.viewRepairRecord, !!pageInfo);
return new Promise((resolve, reject) => {
queryTask
.execute(query)
.then((res) => {
if (pageInfo) {
if (res.data) {
res.data = res.data.map((item) => {
return new ArtRepairFile(item);
});
resolve(res);
}else{
reject(new Error("修复档案数据格式异常"));
}
} else {
let resArr = res.map((item) => {
return new ArtRepairFile(item);
});
resolve(resArr);
}
})
.catch((err) => {
reject(err);
});
});
}
}
export default ArtSystem;

View File

@ -35,12 +35,17 @@ class ConditionReport {
// // let logo=modelOptions.logo;
// modelOptions=new ReportBase()
// }
// let artworkRecord = params.artwork_record;
// if (artworkRecord) {
// this.recordNumber = artworkRecord.record_number;
// this.oldName = artworkRecord.old_name
// }
// this.tagName = params.tag_name
let artworkRecord = params.artwork_record;
if (artworkRecord) {
this.recordNumber = artworkRecord.record_number;
this.oldName = artworkRecord.old_name
}
this.tags = [];
if (params.tag_name) {
this.tags = params.tag_name.map((name) => {
return { name: name };
});
}
this.createBy = params.create_by;
this.createTime = params.create_time;
@ -60,7 +65,7 @@ class ConditionReport {
static conditionCheckInsert(params) {
conditionCheckInsert(params) {
let editTask = new EditTask(artApi.conditionCheckInsert)
editTask.addParam('_artwork_record_id', params.artworkRecordId);
editTask.addParam('_name', params.name);