feat: 钩机监测模块图片展示

main
donghao 4 days ago
parent d074fbe169
commit 3c8f45d6f1

@ -5,7 +5,7 @@
<div class="flex items-center justify-center h-full monitor-left-top"> <div class="flex items-center justify-center h-full monitor-left-top">
<div class="file-preview-screen"> <div class="file-preview-screen">
<!-- // TODO --> <!-- // TODO -->
<img :src="currFileList?.[0]?.image_url" v-if="false" /> <img :src="currFileList?.[0]?.image_url" v-if="currFileList?.[0]?.image_url" />
<div v-else class="w-full h-full bg_error_picture"></div> <div v-else class="w-full h-full bg_error_picture"></div>
</div> </div>
</div> </div>
@ -99,6 +99,7 @@
<DiggerAlarmModal <DiggerAlarmModal
v-model:value="isAlarmOpen" v-model:value="isAlarmOpen"
:info="currentRow" :info="currentRow"
:fileList="currFileList"
@close="isAlarmOpen = false" @close="isAlarmOpen = false"
/> />
<BaseDelete <BaseDelete
@ -355,6 +356,7 @@ const getBeforeFileList = async () => {
function loadDetail() { function loadDetail() {
currentRow.value = listData.value[0]; currentRow.value = listData.value[0];
console.log(currentRow.value, "currentRow");
getFileList(); getFileList();
getBeforeFileList(); getBeforeFileList();
} }

@ -22,7 +22,7 @@
class="cursor-pointer" class="cursor-pointer"
v-if="file?.image_url" v-if="file?.image_url"
/> --> /> -->
<img :src="file?.image_url" v-if="false" /> <img :src="fileList?.[0]?.image_url" v-if="fileList?.[0]?.image_url" />
<div v-else class="w-full h-full bg_error_picture"></div> <div v-else class="w-full h-full bg_error_picture"></div>
</div> </div>
</el-dialog> </el-dialog>
@ -36,6 +36,7 @@ interface Props {
/** 弹窗显隐 */ /** 弹窗显隐 */
value: boolean; value: boolean;
info: Record<string, any>; info: Record<string, any>;
fileList: any[];
} }
interface Emits { interface Emits {
(e: "update:value", val: boolean): void; (e: "update:value", val: boolean): void;
@ -44,6 +45,7 @@ interface Emits {
const props = withDefaults(defineProps<Props>(), { const props = withDefaults(defineProps<Props>(), {
value: false, value: false,
info: {}, info: {},
fileList: []
}); });
const emit = defineEmits<Emits>(); const emit = defineEmits<Emits>();
@ -117,6 +119,10 @@ const show = computed({
padding: 0 24px; padding: 0 24px;
width: 100%; width: 100%;
height: 500px; height: 500px;
img{
width: 100%;
height: 100%;
}
} }
} }
</style> </style>
Loading…
Cancel
Save