110455d2 by renchao@pashanhoo.com

Merge branch 'bus'

2 parents 9f0b5b28 b2bb3b86
......@@ -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-16 09:50:40
* @LastEditTime: 2023-05-30 15:08:51
-->
<!DOCTYPE html>
<html>
......@@ -19,7 +19,7 @@
</head>
<script>
window.baseUrl = location.origin || location.protocol + '//' + location.host
const authorization = "bearer AT-4-MxSrO29Coe7VTazx8uuixtqqgO-hvCB6"
const authorization = "bearer ATT-7-TiYJVcoDnfhNGs160E6MbQ-QA9Ot3Tby"
fetch('<%= BASE_URL %>config.json')
.then(response => response.json())
.then(config => {
......
/*
* @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
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-05-17 10:40:23
* @LastEditTime: 2023-05-29 14:22:48
-->
<template>
<div class="from-clues loadingtext" v-Loading="loading" element-loading-text="拼命加载中..." style="height:720px">
......@@ -11,7 +11,8 @@
v-for="(item, index) in headTabBdcqz" :key="index"></el-tab-pane>
</el-tabs>
<div class="no-data" v-if="headTabBdcqz.length == 0">暂无数据</div>
<img :src="previewImage" class="imgClass">
<!-- <img :src="previewImage" class="imgClass"> -->
<canvas ref="canvas" :width="canvasWidth" :height="canvasHeight"></canvas>
</div>
</template>
......@@ -20,8 +21,6 @@
import { getSlsqBdcqzList, bdcqzPreview } from "@/api/bdcqz.js"
export default {
name: "zsyl",
components: {
},
props: {
formData: {
type: Object,
......@@ -30,6 +29,10 @@
},
data () {
return {
imgSrc: require('@/image/bdcqz/bdcqzs2.jpg'),
canvasWidth: 1018,
canvasHeight: 720,
loading: false,
//印刷序列号集合
ysxlh: [],
......@@ -79,28 +82,54 @@
this.activeName = res.result[0].bsmBdcqz
this.bdcqz = res.result[0]
this.headTabBdcqz = res.result
this.getBdcqzPreview();
} else {
this.loading = false
this.drawTextOnImage();
}
}
this.loading = false
})
},
//tab表头切换方法
handleClick (e) {
this.bdcqz = this.headTabBdcqz[e.index - 0]
this.activeName = this.headTabBdcqz.bsmBdcqz
this.getBdcqzPreview();
},
getBdcqzPreview () {
bdcqzPreview(this.bdcqz).then(res => {
this.loading = false
let blob = new Blob([res]);
let url = window.URL.createObjectURL(blob);
this.previewImage = url;
})
// this.getBdcqzPreview();
this.drawTextOnImage()
},
// getBdcqzPreview () {
// bdcqzPreview(this.bdcqz).then(res => {
// this.loading = false
// let blob = new Blob([res]);
// let url = window.URL.createObjectURL(blob);
// this.previewImage = url;
// this.drawTextOnImage()
// })
// },
drawTextOnImage () {
const canvas = this.$refs.canvas;
const context = canvas.getContext('2d');
const image = new Image();
image.onload = () => {
context.drawImage(image, 0, 0);
context.font = '15px 楷体';
context.fillStyle = '#000000';
context.fillText(this.bdcqz.sjjc ? this.bdcqz.sjjc : '', 60, 56);
context.fillText(this.bdcqz.djnd ? this.bdcqz.djnd : '', 113, 56);
context.fillText(this.bdcqz.sxqc ? this.bdcqz.sxqc : '', 180, 56);
context.fillText(this.bdcqz.sxh ? this.bdcqz.sxh : '', 370, 56);
context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 138, 97);
context.fillText(this.bdcqz.gyqk ? this.bdcqz.gyqk : '', 138, 138);
context.fillText(this.bdcqz.zl ? this.bdcqz.zl : '', 138, 180);
context.fillText(this.bdcqz.bdcdyh ? this.bdcqz.bdcdyh : '', 138, 223);
context.fillText(this.bdcqz.qllx ? this.bdcqz.qllx : '', 138, 263);
context.fillText(this.bdcqz.qlxz ? this.bdcqz.qlxz : '', 138, 303);
context.fillText(this.bdcqz.yt ? this.bdcqz.yt : '', 138, 346);
context.fillText(this.bdcqz.mj ? this.bdcqz.mj : '', 138, 386);
context.fillText(this.bdcqz.syqx ? this.bdcqz.syqx : '', 138, 429);
context.fillText(this.bdcqz.qlqtzk ? this.bdcqz.qlqtzk : '', 138, 469);
context.fillText(this.bdcqz.fj ? this.bdcqz.fj : '', 580, 100);
}
image.src = this.imgSrc;
}
}
}
</script>
......
<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;
......