style:cad
Showing
5 changed files
with
70 additions
and
2 deletions
... | @@ -15,17 +15,21 @@ | ... | @@ -15,17 +15,21 @@ |
15 | "bpmn-js-properties-panel": "^0.37.2", | 15 | "bpmn-js-properties-panel": "^0.37.2", |
16 | "bpmn-js-token-simulation": "^0.10.0", | 16 | "bpmn-js-token-simulation": "^0.10.0", |
17 | "core-js": "^3.6.5", | 17 | "core-js": "^3.6.5", |
18 | "dat.gui": "^0.7.9", | ||
18 | "diagram-js": "^6.8.2", | 19 | "diagram-js": "^6.8.2", |
19 | "js-cookie": "2.2.0", | 20 | "js-cookie": "2.2.0", |
20 | "lodash": "^4.17.21", | 21 | "lodash": "^4.17.21", |
21 | "node-sass": "^4.14.1", | 22 | "node-sass": "^4.14.1", |
22 | "normalize.css": "7.0.0", | 23 | "normalize.css": "7.0.0", |
23 | "nprogress": "0.2.0", | 24 | "nprogress": "0.2.0", |
25 | "oimo": "^1.0.9", | ||
26 | "three": "^0.152.2", | ||
24 | "vue": "2.6.10", | 27 | "vue": "2.6.10", |
25 | "vue-json-editor": "^1.4.3", | 28 | "vue-json-editor": "^1.4.3", |
26 | "vue-quill-editor": "^3.0.6", | 29 | "vue-quill-editor": "^3.0.6", |
27 | "vue-router": "3.0.2", | 30 | "vue-router": "3.0.2", |
28 | "vue-seamless-scroll": "^1.1.23", | 31 | "vue-seamless-scroll": "^1.1.23", |
32 | "vue-threejs": "^0.2.0-alpha.1", | ||
29 | "vuex": "3.1.0", | 33 | "vuex": "3.1.0", |
30 | "x2js": "^3.4.4" | 34 | "x2js": "^3.4.4" |
31 | }, | 35 | }, | ... | ... |
src/views/workflow/components/cad.dwg
0 → 100644
No preview for this file type
src/views/workflow/components/zdt.vue
0 → 100644
1 | <template> | ||
2 | <div ref="canvas"></div> | ||
3 | </template> | ||
4 | |||
5 | <script> | ||
6 | import * as THREE from 'three' | ||
7 | import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader' | ||
8 | import { VueThreejs } from 'vue-threejs' | ||
9 | |||
10 | export default { | ||
11 | mixins: [VueThreejs], | ||
12 | |||
13 | mounted () { | ||
14 | this.initCADViewer() | ||
15 | }, | ||
16 | |||
17 | methods: { | ||
18 | initCADViewer () { | ||
19 | const container = this.$refs.canvas | ||
20 | |||
21 | // 创建场景 | ||
22 | const scene = new THREE.Scene() | ||
23 | |||
24 | // 创建相机 | ||
25 | const camera = new THREE.PerspectiveCamera(45, container.offsetWidth / container.offsetHeight, 0.1, 1000) | ||
26 | camera.position.set(0, 0, 10) | ||
27 | |||
28 | // 创建渲染器 | ||
29 | const renderer = new THREE.WebGLRenderer({ antialias: true }) | ||
30 | renderer.setSize(container.offsetWidth, container.offsetHeight) | ||
31 | container.appendChild(renderer.domElement) | ||
32 | |||
33 | // 添加灯光 | ||
34 | const light = new THREE.DirectionalLight(0xffffff, 1) | ||
35 | light.position.set(0, 0, 1) | ||
36 | scene.add(light) | ||
37 | |||
38 | // 加载CAD文件 | ||
39 | const loader = new GLTFLoader() | ||
40 | loader.load('./cad.dwg', (gltf) => { | ||
41 | scene.add(gltf.scene) | ||
42 | renderer.render(scene, camera) | ||
43 | }) | ||
44 | |||
45 | // 动画循环 | ||
46 | const animate = () => { | ||
47 | requestAnimationFrame(animate) | ||
48 | renderer.render(scene, camera) | ||
49 | } | ||
50 | animate() | ||
51 | } | ||
52 | } | ||
53 | } | ||
54 | </script> | ||
55 | |||
56 | <style> | ||
57 | div { | ||
58 | width: 100%; | ||
59 | height: 100%; | ||
60 | } | ||
61 | </style> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | /* | 1 | /* |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-05-17 10:38:37 | 4 | * @LastEditTime: 2023-05-29 14:39:11 |
5 | */ | 5 | */ |
6 | //流程环节操作按钮 | 6 | //流程环节操作按钮 |
7 | export function getForm (tabName, djywbm) { | 7 | export function getForm (tabName, djywbm) { |
... | @@ -86,6 +86,9 @@ export function getForm (tabName, djywbm) { | ... | @@ -86,6 +86,9 @@ export function getForm (tabName, djywbm) { |
86 | case "fzxx": | 86 | case "fzxx": |
87 | form = require("@/views/workflow/components/fzxx.vue"); | 87 | form = require("@/views/workflow/components/fzxx.vue"); |
88 | break; | 88 | break; |
89 | case "zdt": | ||
90 | form = require("@/views/workflow/components/zdt.vue"); | ||
91 | break; | ||
89 | default: | 92 | default: |
90 | form = require("@/views/error-page/404.vue"); | 93 | form = require("@/views/error-page/404.vue"); |
91 | break; | 94 | break; | ... | ... |
-
Please register or sign in to post a comment