554d99a5 by renchao@pashanhoo.com

style:cad

1 parent 9e8a5fea
......@@ -15,17 +15,21 @@
"bpmn-js-properties-panel": "^0.37.2",
"bpmn-js-token-simulation": "^0.10.0",
"core-js": "^3.6.5",
"dat.gui": "^0.7.9",
"diagram-js": "^6.8.2",
"js-cookie": "2.2.0",
"lodash": "^4.17.21",
"node-sass": "^4.14.1",
"normalize.css": "7.0.0",
"nprogress": "0.2.0",
"oimo": "^1.0.9",
"three": "^0.152.2",
"vue": "2.6.10",
"vue-json-editor": "^1.4.3",
"vue-quill-editor": "^3.0.6",
"vue-router": "3.0.2",
"vue-seamless-scroll": "^1.1.23",
"vue-threejs": "^0.2.0-alpha.1",
"vuex": "3.1.0",
"x2js": "^3.4.4"
},
......
/*
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-05-06 09:14:47
* @LastEditTime: 2023-05-29 15:14:35
*/
import Vue from 'vue'
import App from './App'
......
No preview for this file type
<template>
<div ref="canvas"></div>
</template>
<script>
import * as THREE from 'three'
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader'
import { VueThreejs } from 'vue-threejs'
export default {
mixins: [VueThreejs],
mounted () {
this.initCADViewer()
},
methods: {
initCADViewer () {
const container = this.$refs.canvas
// 创建场景
const scene = new THREE.Scene()
// 创建相机
const camera = new THREE.PerspectiveCamera(45, container.offsetWidth / container.offsetHeight, 0.1, 1000)
camera.position.set(0, 0, 10)
// 创建渲染器
const renderer = new THREE.WebGLRenderer({ antialias: true })
renderer.setSize(container.offsetWidth, container.offsetHeight)
container.appendChild(renderer.domElement)
// 添加灯光
const light = new THREE.DirectionalLight(0xffffff, 1)
light.position.set(0, 0, 1)
scene.add(light)
// 加载CAD文件
const loader = new GLTFLoader()
loader.load('./cad.dwg', (gltf) => {
scene.add(gltf.scene)
renderer.render(scene, camera)
})
// 动画循环
const animate = () => {
requestAnimationFrame(animate)
renderer.render(scene, camera)
}
animate()
}
}
}
</script>
<style>
div {
width: 100%;
height: 100%;
}
</style>
\ No newline at end of file
/*
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-05-17 10:38:37
* @LastEditTime: 2023-05-29 14:39:11
*/
//流程环节操作按钮
export function getForm (tabName, djywbm) {
......@@ -86,6 +86,9 @@ export function getForm (tabName, djywbm) {
case "fzxx":
form = require("@/views/workflow/components/fzxx.vue");
break;
case "zdt":
form = require("@/views/workflow/components/zdt.vue");
break;
default:
form = require("@/views/error-page/404.vue");
break;
......