|
@@ -617,35 +617,42 @@
|
|
|
// w: 680;
|
|
|
// x: 1454;
|
|
|
// y: 19;
|
|
|
- const newAlarmData = alarmLog.map((item: any, i: number) => {
|
|
|
- return {
|
|
|
- ...item,
|
|
|
- Name: item.AlgorithmName,
|
|
|
- type: item.AlgorithmName,
|
|
|
- status: 0,
|
|
|
- isRead: false,
|
|
|
- img: `${app.ip}/rpc/rabbitMQ/KunPengYun/Files/${record.src}&GUID=${props.data.id}`,
|
|
|
- tImg: `${app.ip}/rpc/rabbitMQ/KunPengYun/Files/${record.src}&GUID=${props.data.id}`,
|
|
|
- imgJson: {
|
|
|
- imageHeight: 3840,
|
|
|
- imageWidth: 2160,
|
|
|
- resultData: {
|
|
|
- objectList: [
|
|
|
- {
|
|
|
- rect: {
|
|
|
- ...alarmLog[i],
|
|
|
- width: alarmLog[i].w,
|
|
|
- height: alarmLog[i].h,
|
|
|
+ record.loading = true;
|
|
|
+ const img = document.createElement('img');
|
|
|
+ img.src = `${app.ip}/rpc/rabbitMQ/KunPengYun/Files/${record.src}&GUID=${props.data.id}`;
|
|
|
+ img.onload = () => {
|
|
|
+ const [w, h] = [img.width, img.height];
|
|
|
+ const newAlarmData = alarmLog.map((item: any, i: number) => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ Name: item.AlgorithmName,
|
|
|
+ type: item.AlgorithmName,
|
|
|
+ status: 0,
|
|
|
+ isRead: false,
|
|
|
+ img: img.src,
|
|
|
+ tImg: img.src,
|
|
|
+ imgJson: {
|
|
|
+ imageHeight: h,
|
|
|
+ imageWidth: w,
|
|
|
+ resultData: {
|
|
|
+ objectList: [
|
|
|
+ {
|
|
|
+ rect: {
|
|
|
+ ...alarmLog[i],
|
|
|
+ width: alarmLog[i].w,
|
|
|
+ height: alarmLog[i].h,
|
|
|
+ },
|
|
|
},
|
|
|
- },
|
|
|
- ],
|
|
|
+ ],
|
|
|
+ },
|
|
|
},
|
|
|
- },
|
|
|
- };
|
|
|
- });
|
|
|
- const [firstAlarmData] = newAlarmData;
|
|
|
- viewData.value = firstAlarmData;
|
|
|
- viewDrawerRef.value.open();
|
|
|
+ };
|
|
|
+ });
|
|
|
+ const [firstAlarmData] = newAlarmData;
|
|
|
+ viewData.value = firstAlarmData;
|
|
|
+ viewDrawerRef.value.open();
|
|
|
+ record.loading = false;
|
|
|
+ };
|
|
|
};
|
|
|
watch(
|
|
|
radioActive,
|