|
@@ -1,9 +1,13 @@
|
|
|
<script setup lang="ts">
|
|
|
import type { AnalysisModel } from '@/request/model';
|
|
|
|
|
|
-type Props = AnalysisModel & { title?: string };
|
|
|
+type Props = AnalysisModel & { title?: string, exceptionType?: 'list' | 'group' };
|
|
|
|
|
|
-const { table, exception, result = null, cover = [], title = '分析' } = defineProps<Props>();
|
|
|
+const {
|
|
|
+ title = '分析', exceptionType = 'list',
|
|
|
+ table, result = null, cover = [],
|
|
|
+ exception, exceptionGroup,
|
|
|
+} = defineProps<Props>();
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
@@ -46,8 +50,8 @@ const { table, exception, result = null, cover = [], title = '分析' } = define
|
|
|
</slot>
|
|
|
</div>
|
|
|
<slot name="exception">
|
|
|
- <div class="grid grid-rows-1 grid-cols-2 gap-8 m-6">
|
|
|
- <div class="card text-lg" v-for="item in exception">
|
|
|
+ <div class="grid grid-rows-1 grid-cols-2 gap-8 m-6" v-if="exceptionType === 'list'">
|
|
|
+ <div class="card text-lg" v-for="item in exception" :key="item.title">
|
|
|
<div class="card__title mb-3 text-primary text-2xl font-bold">{{ item.title }}</div>
|
|
|
<div class="card__content">
|
|
|
<div class="flex my-6 justify-center">
|
|
@@ -69,6 +73,24 @@ const { table, exception, result = null, cover = [], title = '分析' } = define
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="grid grid-rows-1 grid-cols-1 gap-8 m-6" v-else-if="exceptionType === 'group'" >
|
|
|
+ <div class="card text-lg" v-for="group in exceptionGroup" :key="group.key">
|
|
|
+ <div class="card__content">
|
|
|
+ <div class="flex mb-6 justify-center">
|
|
|
+ <img v-if="group.key" class="flex-none w-2/4 max-h-[200px] object-scale-down" :src="group.key" alt="分析异常图像" />
|
|
|
+ </div>
|
|
|
+ <div class="my-3" v-for="item in group.exception" :key="item.title">
|
|
|
+ <div class="card__title mb-2 text-primary text-2xl font-bold">{{ item.title }}</div>
|
|
|
+ <div class="card__content">
|
|
|
+ <div class="my-2 text-grey" v-for="description in item.descriptions" :key="description.value">
|
|
|
+ <label>{{ description.label }}</label>
|
|
|
+ <span v-html="description.value"></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</slot>
|
|
|
</slot>
|
|
|
</van-skeleton>
|