This commit is contained in:
nicomacbookpro
2025-08-22 10:04:26 +08:00
parent 72c878828f
commit ddee8a839b
2 changed files with 115 additions and 115 deletions

View File

@@ -1,98 +1,97 @@
import Vue from 'vue' import Vue from 'vue'
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
import Element from 'element-ui' import Element from 'element-ui'
import './assets/styles/element-variables.scss' import './assets/styles/element-variables.scss'
import lang from "element-ui/lib/locale/lang/zh-CN"; import lang from "element-ui/lib/locale/lang/zh-CN";
// 修改中文语言包的分页文本 // 修改中文语言包的分页文本
lang.el.pagination.goto = "跳转到"; lang.el.pagination.goto = "跳转到";
lang.el.pagination.total = "共 {total} 条信息"; lang.el.pagination.total = "共 {total} 条信息";
import '@/assets/styles/index.scss' // global css import '@/assets/styles/index.scss' // global css
import '@/assets/styles/ruoyi.scss' // ruoyi css import '@/assets/styles/ruoyi.scss' // ruoyi css
import App from './App' import App from './App'
import store from './store' import store from './store'
import router from './router' import router from './router'
import directive from './directive' // directive import directive from './directive' // directive
import plugins from './plugins' // plugins import plugins from './plugins' // plugins
import { download } from '@/utils/request' import { download } from '@/utils/request'
import "amfe-flexible"; import "amfe-flexible";
import { px2rem, px2remDirective, dictLabel } from "@/utils/px2rem"; import { px2rem, px2remDirective, dictLabel } from "@/utils/px2rem";
Vue.prototype.$px2rem = px2rem; Vue.prototype.$px2rem = px2rem;
Vue.prototype.$dictLabel = dictLabel; Vue.prototype.$dictLabel = dictLabel;
Vue.directive("px", px2remDirective); Vue.directive("px", px2remDirective);
import './assets/icons' // icon/ permission control import './assets/icons' // icon/ permission control
import { getDicts } from "@/api/system/dict/data" import { getDicts } from "@/api/system/dict/data"
import { getConfigKey } from "@/api/system/config" import { getConfigKey } from "@/api/system/config"
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi" import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi"
// 分页组件 // 分页组件
import Pagination from "@/components/Pagination" import Pagination from "@/components/Pagination"
// 自定义表格工具组件 // 自定义表格工具组件
import RightToolbar from "@/components/RightToolbar" import RightToolbar from "@/components/RightToolbar"
// 富文本组件 // 富文本组件
import Editor from "@/components/Editor" import Editor from "@/components/Editor"
// 文件上传组件 // 文件上传组件
import FileUpload from "@/components/FileUpload" import FileUpload from "@/components/FileUpload"
// 图片上传组件 // 图片上传组件
import ImageUpload from "@/components/ImageUpload" import ImageUpload from "@/components/ImageUpload"
// 图片预览组件 // 图片预览组件
import ImagePreview from "@/components/ImagePreview" import ImagePreview from "@/components/ImagePreview"
// 字典标签组件 // 字典标签组件
import DictTag from '@/components/DictTag' import DictTag from '@/components/DictTag'
// 字典数据组件 // 字典数据组件
import DictData from '@/components/DictData' import DictData from '@/components/DictData'
import leftNav from "@/components/leftNav/index.vue"; import leftNav from "@/components/leftNav/index.vue";
// 全局方法挂载
// 全局方法挂载 Vue.prototype.getDicts = getDicts
Vue.prototype.getDicts = getDicts Vue.prototype.getConfigKey = getConfigKey
Vue.prototype.getConfigKey = getConfigKey Vue.prototype.parseTime = parseTime
Vue.prototype.parseTime = parseTime Vue.prototype.resetForm = resetForm
Vue.prototype.resetForm = resetForm Vue.prototype.addDateRange = addDateRange
Vue.prototype.addDateRange = addDateRange Vue.prototype.selectDictLabel = selectDictLabel
Vue.prototype.selectDictLabel = selectDictLabel Vue.prototype.selectDictLabels = selectDictLabels
Vue.prototype.selectDictLabels = selectDictLabels Vue.prototype.download = download
Vue.prototype.download = download Vue.prototype.handleTree = handleTree
Vue.prototype.handleTree = handleTree
// 全局组件挂载
// 全局组件挂载 Vue.component('DictTag', DictTag)
Vue.component('DictTag', DictTag) Vue.component('Pagination', Pagination)
Vue.component('Pagination', Pagination) Vue.component('RightToolbar', RightToolbar)
Vue.component('RightToolbar', RightToolbar) Vue.component('Editor', Editor)
Vue.component('Editor', Editor) Vue.component('FileUpload', FileUpload)
Vue.component('FileUpload', FileUpload) Vue.component('ImageUpload', ImageUpload)
Vue.component('ImageUpload', ImageUpload) Vue.component('ImagePreview', ImagePreview)
Vue.component('ImagePreview', ImagePreview) Vue.component("leftNav", leftNav);
Vue.component("leftNav", leftNav);
Vue.use(directive)
Vue.use(directive) Vue.use(plugins)
Vue.use(plugins) DictData.install()
DictData.install()
/**
/** * If you don't want to use mock-server
* If you don't want to use mock-server * you want to use MockJs for mock api
* you want to use MockJs for mock api * you can execute: mockXHR()
* you can execute: mockXHR() *
* * Currently MockJs will be used in the production environment,
* Currently MockJs will be used in the production environment, * please remove it before going online! ! !
* please remove it before going online! ! ! */
*/
Vue.use(Element, {
Vue.use(Element, { size: Cookies.get('size') || 'medium' // set element-ui default size
size: Cookies.get('size') || 'medium' // set element-ui default size })
})
Vue.config.productionTip = false
Vue.config.productionTip = false
new Vue({
new Vue({ el: '#app',
el: '#app', router,
router, store,
store, render: h => h(App)
render: h => h(App) })
})

View File

@@ -89,15 +89,7 @@ function createDashedLinesForBall(
const line = new Line(geo, mat); const line = new Line(geo, mat);
line.computeLineDistances(); line.computeLineDistances();
scene.add(line); scene.add(line);
// return line;
// let light = new THREE.DirectionalLight(0xffffff, 0.25);
// light.position.setScalar(1);
// scene.add(light);
// let light = new THREE.AmbientLight(0xffffff, 0.75);
// scene.add(light);
// 创建箭头
const dir = new THREE.Vector3(); const dir = new THREE.Vector3();
// if (direction === "down") dir.set(0, -1, 0);
if (direction === "back") dir.set(0, 0, -1); if (direction === "back") dir.set(0, 0, -1);
else if (direction === "left") dir.set(1, 0, 0); else if (direction === "left") dir.set(1, 0, 0);
@@ -114,7 +106,7 @@ function createDashedLinesForBall(
arrowHelper.line.material.opacity = 0.6; arrowHelper.line.material.opacity = 0.6;
// 设置箭头头部透明度 // 设置箭头头部透明度
arrowHelper.cone.material = new THREE.MeshBasicMaterial({ arrowHelper.cone.material = new THREE.MeshBasicMaterial({
color: "#00ff00", color: color,
transparent: true, // 必须设置为true transparent: true, // 必须设置为true
opacity: 0.6, // 与线段相同的透明度 opacity: 0.6, // 与线段相同的透明度
}); });
@@ -448,7 +440,6 @@ const dracoLoader = new DRACOLoader().setDecoderPath("/draco/"); // 设置Draco
const gltfLoader = new GLTFLoader().setDRACOLoader(dracoLoader); // GLTF加载器关联Draco const gltfLoader = new GLTFLoader().setDRACOLoader(dracoLoader); // GLTF加载器关联Draco
/* ========== 主函数:画三维坐标轴及交互 ========== */ /* ========== 主函数:画三维坐标轴及交互 ========== */
/** /**
* 在传入的DOM元素内创建完整的三维坐标系、网格面、刻度、球体模型、交互、后处理、UI按钮等。 * 在传入的DOM元素内创建完整的三维坐标系、网格面、刻度、球体模型、交互、后处理、UI按钮等。
@@ -605,7 +596,17 @@ export function drawAxes(element, options = {}, ballCallBack) {
function createDom(i, axes) { function createDom(i, axes) {
const div = document.createElement('div') const div = document.createElement('div')
div.style.cursor = 'pointer'
div.addEventListener('click', () => {
console.log('click', i, axes)
})
div.addEventListener('mouseover', () => {
console.log('mouseover', i, axes)
})
div.addEventListener('mouseout', () => {
console.log('mouseout', i, axes)
})
const img = document.createElement('img') const img = document.createElement('img')
img.src = process.env.VUE_APP_BASE_URL + `/icon_xz/${axes}0${i}.png` img.src = process.env.VUE_APP_BASE_URL + `/icon_xz/${axes}0${i}.png`
@@ -729,13 +730,13 @@ export function drawAxes(element, options = {}, ballCallBack) {
}); });
styleGroups["灰球"] = null; styleGroups["灰球"] = null;
const lineGeometryColors = [ const lineGeometryColors = [
"#779c6e", "rgb(102,129,102)",
"#779c6e", "rgb(79,78,177)",
"#3ee4bc", "rgb(81,157,155)",
"#ca41e7", "rgb(102,129,102)",
"#c88d38", "rgb(166,47,176)",
"#7467ef",
"#c7bef7", "rgb(166,47,176)",
]; ];
const geometryColors = [ const geometryColors = [
"#888888", "#888888",