Files
FiDA_Front/src/views/home/test.vue

53 lines
1.4 KiB
Vue
Raw Normal View History

2026-02-02 14:12:23 +08:00
<template>
<div class="test">
2026-02-26 11:45:32 +08:00
<button @click="openCanvas">打开画布</button>
2026-03-06 15:50:05 +08:00
<button @click="openDepthCanvas">打开深度画布</button>
2026-02-02 14:12:23 +08:00
</div>
</template>
<script setup lang="ts">
2026-02-26 11:45:32 +08:00
import myEvent from '@/utils/myEvent'
import { computed, onMounted } from 'vue'
2026-02-05 10:45:02 +08:00
import { useRoute } from 'vue-router'
const route = useRoute()
2026-03-25 11:27:24 +08:00
const url =
2026-03-31 13:29:46 +08:00
'https://www.minio-api.aida.com.hk/fida-user/2/d8512e53-f016-4ad6-8245-2f304d89e7b2.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=admin%2F20260331%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260331T032733Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=25e5ec227a0ca22942e71eff3a4f07a23f8812ff3db5522e1466b3a77288be70'
2026-02-26 11:45:32 +08:00
const openCanvas = () => {
2026-04-14 14:26:41 +08:00
myEvent.emit('openFlowCanvas', {
url,
imgId: '69bcaae11e0cee430b750050',
nodeId: '69cde574a510db41350b404c'
})
2026-03-06 15:50:05 +08:00
}
const openDepthCanvas = () => {
2026-03-31 13:29:46 +08:00
myEvent.emit('openDepthCanvas', {
url,
canvasId: '69cb3f244a1dd46c0bdbb432',
sketchId: '69c63417cb064e32ff6826a3'
})
2026-02-26 11:45:32 +08:00
}
onMounted(() => {
2026-03-06 15:50:05 +08:00
if (route.query.depth) {
openDepthCanvas()
} else {
openCanvas()
}
2026-02-26 11:45:32 +08:00
})
2026-02-02 14:12:23 +08:00
</script>
<style lang="less" scoped>
.test {
2026-02-05 15:26:34 +08:00
margin: 2rem;
border-radius: 2rem;
2026-02-27 17:32:56 +08:00
background-color: rgb(255, 255, 255);
2026-02-02 14:12:23 +08:00
display: flex;
align-items: center;
justify-content: center;
2026-02-26 11:45:32 +08:00
flex-direction: column;
2026-03-06 15:50:05 +08:00
gap: 2rem;
> button {
2026-02-26 11:45:32 +08:00
font-size: 10rem;
}
2026-02-02 14:12:23 +08:00
}
</style>