|
@@ -38,6 +38,7 @@
|
|
|
<FormDialog ref="formDialogRef" />
|
|
|
<!-- <ImportExcel ref="dialogRef" /> -->
|
|
|
<PreviewImages :visible="dialogVisible" :urls="imageUrls" @close="dialogVisible = false" />
|
|
|
+ <PreviewCompareImages ref="previewImagesRef" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -59,19 +60,46 @@ import {
|
|
|
importDataSeqDataApi,
|
|
|
exportDataSeqApi,
|
|
|
getDataSeqApi,
|
|
|
- getAllImagesApi
|
|
|
+ getAllImagesApi,
|
|
|
+ getCOMPImagesApi
|
|
|
} from '@/api/modules/demo/DataSeq'
|
|
|
import { enumsSubSystem } from '../utils'
|
|
|
import PreviewImages from '@/views/demo/components/PreviewImages.vue'
|
|
|
+import { SubSystem__ } from '@/views/demo/utils'
|
|
|
+
|
|
|
+import PreviewCompareImages from '@/views/demo/components/PreviewCompareImages.vue'
|
|
|
+
|
|
|
const dialogVisible = ref(false)
|
|
|
const imageUrls = ref([])
|
|
|
const preview = async row => {
|
|
|
console.log('showImages')
|
|
|
- const data: any = await getAllImagesApi(row.inputOssId)
|
|
|
- imageUrls.value = data.data
|
|
|
- dialogVisible.value = true
|
|
|
+ console.log(row)
|
|
|
+ if (row.subsystem !== SubSystem__['可见光转红外']) {
|
|
|
+ console.log('不可见光转红外')
|
|
|
+ const data: any = await getAllImagesApi(row.inputOssId)
|
|
|
+ imageUrls.value = data.data
|
|
|
+ dialogVisible.value = true
|
|
|
+ } else {
|
|
|
+ console.log('可见光转红外')
|
|
|
+ let res = null
|
|
|
+ try {
|
|
|
+ res = await previewImagesRef.value?.handleOpen(getCOMPImagesApi, row.inputOssId)
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error)
|
|
|
+ res = null
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!res) {
|
|
|
+ previewImagesRef.value?.closeDialog()
|
|
|
+ const data: any = await getAllImagesApi(row.inputOssId)
|
|
|
+ imageUrls.value = data.data
|
|
|
+ dialogVisible.value = true
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+const previewImagesRef = ref()
|
|
|
+
|
|
|
// ProTable 实例
|
|
|
const proTable = ref<ProTableInstance>()
|
|
|
|