Merge branch 'bus'
Showing
7 changed files
with
118 additions
and
21 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 | }, | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Description: | 2 | * @Description: |
| 3 | * @Autor: renchao | 3 | * @Autor: renchao |
| 4 | * @LastEditTime: 2023-05-16 09:50:40 | 4 | * @LastEditTime: 2023-05-30 15:08:51 |
| 5 | --> | 5 | --> |
| 6 | <!DOCTYPE html> | 6 | <!DOCTYPE html> |
| 7 | <html> | 7 | <html> |
| ... | @@ -19,7 +19,7 @@ | ... | @@ -19,7 +19,7 @@ |
| 19 | </head> | 19 | </head> |
| 20 | <script> | 20 | <script> |
| 21 | window.baseUrl = location.origin || location.protocol + '//' + location.host | 21 | window.baseUrl = location.origin || location.protocol + '//' + location.host |
| 22 | const authorization = "bearer AT-4-MxSrO29Coe7VTazx8uuixtqqgO-hvCB6" | 22 | const authorization = "bearer ATT-7-TiYJVcoDnfhNGs160E6MbQ-QA9Ot3Tby" |
| 23 | fetch('<%= BASE_URL %>config.json') | 23 | fetch('<%= BASE_URL %>config.json') |
| 24 | .then(response => response.json()) | 24 | .then(response => response.json()) |
| 25 | .then(config => { | 25 | .then(config => { | ... | ... |
src/views/workflow/components/cad.dwg
0 → 100644
No preview for this file type
| 1 | <!-- | 1 | <!-- |
| 2 | * @Description: | 2 | * @Description: |
| 3 | * @Autor: renchao | 3 | * @Autor: renchao |
| 4 | * @LastEditTime: 2023-05-17 10:40:23 | 4 | * @LastEditTime: 2023-05-29 14:22:48 |
| 5 | --> | 5 | --> |
| 6 | <template> | 6 | <template> |
| 7 | <div class="from-clues loadingtext" v-Loading="loading" element-loading-text="拼命加载中..." style="height:720px"> | 7 | <div class="from-clues loadingtext" v-Loading="loading" element-loading-text="拼命加载中..." style="height:720px"> |
| ... | @@ -11,7 +11,8 @@ | ... | @@ -11,7 +11,8 @@ |
| 11 | v-for="(item, index) in headTabBdcqz" :key="index"></el-tab-pane> | 11 | v-for="(item, index) in headTabBdcqz" :key="index"></el-tab-pane> |
| 12 | </el-tabs> | 12 | </el-tabs> |
| 13 | <div class="no-data" v-if="headTabBdcqz.length == 0">暂无数据</div> | 13 | <div class="no-data" v-if="headTabBdcqz.length == 0">暂无数据</div> |
| 14 | <img :src="previewImage" class="imgClass"> | 14 | <!-- <img :src="previewImage" class="imgClass"> --> |
| 15 | <canvas ref="canvas" :width="canvasWidth" :height="canvasHeight"></canvas> | ||
| 15 | </div> | 16 | </div> |
| 16 | </template> | 17 | </template> |
| 17 | 18 | ||
| ... | @@ -20,8 +21,6 @@ | ... | @@ -20,8 +21,6 @@ |
| 20 | import { getSlsqBdcqzList, bdcqzPreview } from "@/api/bdcqz.js" | 21 | import { getSlsqBdcqzList, bdcqzPreview } from "@/api/bdcqz.js" |
| 21 | export default { | 22 | export default { |
| 22 | name: "zsyl", | 23 | name: "zsyl", |
| 23 | components: { | ||
| 24 | }, | ||
| 25 | props: { | 24 | props: { |
| 26 | formData: { | 25 | formData: { |
| 27 | type: Object, | 26 | type: Object, |
| ... | @@ -30,6 +29,10 @@ | ... | @@ -30,6 +29,10 @@ |
| 30 | }, | 29 | }, |
| 31 | data () { | 30 | data () { |
| 32 | return { | 31 | return { |
| 32 | imgSrc: require('@/image/bdcqz/bdcqzs2.jpg'), | ||
| 33 | canvasWidth: 1018, | ||
| 34 | canvasHeight: 720, | ||
| 35 | |||
| 33 | loading: false, | 36 | loading: false, |
| 34 | //印刷序列号集合 | 37 | //印刷序列号集合 |
| 35 | ysxlh: [], | 38 | ysxlh: [], |
| ... | @@ -79,28 +82,54 @@ | ... | @@ -79,28 +82,54 @@ |
| 79 | this.activeName = res.result[0].bsmBdcqz | 82 | this.activeName = res.result[0].bsmBdcqz |
| 80 | this.bdcqz = res.result[0] | 83 | this.bdcqz = res.result[0] |
| 81 | this.headTabBdcqz = res.result | 84 | this.headTabBdcqz = res.result |
| 82 | this.getBdcqzPreview(); | 85 | this.drawTextOnImage(); |
| 83 | } else { | ||
| 84 | this.loading = false | ||
| 85 | } | 86 | } |
| 86 | } | 87 | } |
| 87 | 88 | this.loading = false | |
| 88 | }) | 89 | }) |
| 89 | }, | 90 | }, |
| 90 | //tab表头切换方法 | 91 | //tab表头切换方法 |
| 91 | handleClick (e) { | 92 | handleClick (e) { |
| 92 | this.bdcqz = this.headTabBdcqz[e.index - 0] | 93 | this.bdcqz = this.headTabBdcqz[e.index - 0] |
| 93 | this.activeName = this.headTabBdcqz.bsmBdcqz | 94 | this.activeName = this.headTabBdcqz.bsmBdcqz |
| 94 | this.getBdcqzPreview(); | 95 | // this.getBdcqzPreview(); |
| 95 | }, | 96 | this.drawTextOnImage() |
| 96 | getBdcqzPreview () { | ||
| 97 | bdcqzPreview(this.bdcqz).then(res => { | ||
| 98 | this.loading = false | ||
| 99 | let blob = new Blob([res]); | ||
| 100 | let url = window.URL.createObjectURL(blob); | ||
| 101 | this.previewImage = url; | ||
| 102 | }) | ||
| 103 | }, | 97 | }, |
| 98 | // getBdcqzPreview () { | ||
| 99 | // bdcqzPreview(this.bdcqz).then(res => { | ||
| 100 | // this.loading = false | ||
| 101 | // let blob = new Blob([res]); | ||
| 102 | // let url = window.URL.createObjectURL(blob); | ||
| 103 | // this.previewImage = url; | ||
| 104 | // this.drawTextOnImage() | ||
| 105 | // }) | ||
| 106 | // }, | ||
| 107 | drawTextOnImage () { | ||
| 108 | const canvas = this.$refs.canvas; | ||
| 109 | const context = canvas.getContext('2d'); | ||
| 110 | const image = new Image(); | ||
| 111 | image.onload = () => { | ||
| 112 | context.drawImage(image, 0, 0); | ||
| 113 | context.font = '15px 楷体'; | ||
| 114 | context.fillStyle = '#000000'; | ||
| 115 | context.fillText(this.bdcqz.sjjc ? this.bdcqz.sjjc : '', 60, 56); | ||
| 116 | context.fillText(this.bdcqz.djnd ? this.bdcqz.djnd : '', 113, 56); | ||
| 117 | context.fillText(this.bdcqz.sxqc ? this.bdcqz.sxqc : '', 180, 56); | ||
| 118 | context.fillText(this.bdcqz.sxh ? this.bdcqz.sxh : '', 370, 56); | ||
| 119 | context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 138, 97); | ||
| 120 | context.fillText(this.bdcqz.gyqk ? this.bdcqz.gyqk : '', 138, 138); | ||
| 121 | context.fillText(this.bdcqz.zl ? this.bdcqz.zl : '', 138, 180); | ||
| 122 | context.fillText(this.bdcqz.bdcdyh ? this.bdcqz.bdcdyh : '', 138, 223); | ||
| 123 | context.fillText(this.bdcqz.qllx ? this.bdcqz.qllx : '', 138, 263); | ||
| 124 | context.fillText(this.bdcqz.qlxz ? this.bdcqz.qlxz : '', 138, 303); | ||
| 125 | context.fillText(this.bdcqz.yt ? this.bdcqz.yt : '', 138, 346); | ||
| 126 | context.fillText(this.bdcqz.mj ? this.bdcqz.mj : '', 138, 386); | ||
| 127 | context.fillText(this.bdcqz.syqx ? this.bdcqz.syqx : '', 138, 429); | ||
| 128 | context.fillText(this.bdcqz.qlqtzk ? this.bdcqz.qlqtzk : '', 138, 469); | ||
| 129 | context.fillText(this.bdcqz.fj ? this.bdcqz.fj : '', 580, 100); | ||
| 130 | } | ||
| 131 | image.src = this.imgSrc; | ||
| 132 | } | ||
| 104 | } | 133 | } |
| 105 | } | 134 | } |
| 106 | </script> | 135 | </script> | ... | ... |
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