2023-05-30 19:27:03 +08:00

37 lines
1019 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div>
<cadPreview
:documentId="documentsId"
:accessToken="tokenTes"
:write="false"
v-if="tokenTes"
></cadPreview>
</div>
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue';
import { getThirdToken } from '@/utils/commonMethonds';
import cadPreview from '@/views/components/cadPreview.vue';
export default defineComponent({
components: { cadPreview },
name: 'crownCAD',
setup() {
//TODO documentsId 目前需要通过项目去创建文档并生成对应的文档ID
// 或者通过调用新建文档接口
// 也可以直接通过调用 /thirdparty/inventory 进入项目,进行创建
const documentsId = ref('63dcce4e13f6f37d0f7c4ba4');
// accessToken 从 /thirdparty/token 接口返回值中取到
const tokenTes = ref();
getThirdToken().then((res: string) => {
tokenTes.value = res;
});
return {
tokenTes,
documentsId,
};
},
});
</script>
<style lang="less" scoped></style>