修改
This commit is contained in:
195
src/main.js
195
src/main.js
@@ -1,98 +1,97 @@
|
||||
import Vue from 'vue'
|
||||
|
||||
import Cookies from 'js-cookie'
|
||||
|
||||
import Element from 'element-ui'
|
||||
import './assets/styles/element-variables.scss'
|
||||
import lang from "element-ui/lib/locale/lang/zh-CN";
|
||||
|
||||
// 修改中文语言包的分页文本
|
||||
lang.el.pagination.goto = "跳转到";
|
||||
lang.el.pagination.total = "共 {total} 条信息";
|
||||
|
||||
|
||||
import '@/assets/styles/index.scss' // global css
|
||||
import '@/assets/styles/ruoyi.scss' // ruoyi css
|
||||
import App from './App'
|
||||
import store from './store'
|
||||
import router from './router'
|
||||
import directive from './directive' // directive
|
||||
import plugins from './plugins' // plugins
|
||||
import { download } from '@/utils/request'
|
||||
|
||||
import "amfe-flexible";
|
||||
|
||||
import { px2rem, px2remDirective, dictLabel } from "@/utils/px2rem";
|
||||
Vue.prototype.$px2rem = px2rem;
|
||||
Vue.prototype.$dictLabel = dictLabel;
|
||||
Vue.directive("px", px2remDirective);
|
||||
|
||||
import './assets/icons' // icon/ permission control
|
||||
import { getDicts } from "@/api/system/dict/data"
|
||||
import { getConfigKey } from "@/api/system/config"
|
||||
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi"
|
||||
// 分页组件
|
||||
import Pagination from "@/components/Pagination"
|
||||
// 自定义表格工具组件
|
||||
import RightToolbar from "@/components/RightToolbar"
|
||||
// 富文本组件
|
||||
import Editor from "@/components/Editor"
|
||||
// 文件上传组件
|
||||
import FileUpload from "@/components/FileUpload"
|
||||
// 图片上传组件
|
||||
import ImageUpload from "@/components/ImageUpload"
|
||||
// 图片预览组件
|
||||
import ImagePreview from "@/components/ImagePreview"
|
||||
// 字典标签组件
|
||||
import DictTag from '@/components/DictTag'
|
||||
// 字典数据组件
|
||||
import DictData from '@/components/DictData'
|
||||
|
||||
import leftNav from "@/components/leftNav/index.vue";
|
||||
|
||||
// 全局方法挂载
|
||||
Vue.prototype.getDicts = getDicts
|
||||
Vue.prototype.getConfigKey = getConfigKey
|
||||
Vue.prototype.parseTime = parseTime
|
||||
Vue.prototype.resetForm = resetForm
|
||||
Vue.prototype.addDateRange = addDateRange
|
||||
Vue.prototype.selectDictLabel = selectDictLabel
|
||||
Vue.prototype.selectDictLabels = selectDictLabels
|
||||
Vue.prototype.download = download
|
||||
Vue.prototype.handleTree = handleTree
|
||||
|
||||
// 全局组件挂载
|
||||
Vue.component('DictTag', DictTag)
|
||||
Vue.component('Pagination', Pagination)
|
||||
Vue.component('RightToolbar', RightToolbar)
|
||||
Vue.component('Editor', Editor)
|
||||
Vue.component('FileUpload', FileUpload)
|
||||
Vue.component('ImageUpload', ImageUpload)
|
||||
Vue.component('ImagePreview', ImagePreview)
|
||||
Vue.component("leftNav", leftNav);
|
||||
|
||||
Vue.use(directive)
|
||||
Vue.use(plugins)
|
||||
DictData.install()
|
||||
|
||||
/**
|
||||
* If you don't want to use mock-server
|
||||
* you want to use MockJs for mock api
|
||||
* you can execute: mockXHR()
|
||||
*
|
||||
* Currently MockJs will be used in the production environment,
|
||||
* please remove it before going online! ! !
|
||||
*/
|
||||
|
||||
Vue.use(Element, {
|
||||
size: Cookies.get('size') || 'medium' // set element-ui default size
|
||||
})
|
||||
|
||||
Vue.config.productionTip = false
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
router,
|
||||
store,
|
||||
render: h => h(App)
|
||||
})
|
||||
import Vue from 'vue'
|
||||
|
||||
import Cookies from 'js-cookie'
|
||||
|
||||
import Element from 'element-ui'
|
||||
import './assets/styles/element-variables.scss'
|
||||
import lang from "element-ui/lib/locale/lang/zh-CN";
|
||||
|
||||
// 修改中文语言包的分页文本
|
||||
lang.el.pagination.goto = "跳转到";
|
||||
lang.el.pagination.total = "共 {total} 条信息";
|
||||
|
||||
|
||||
import '@/assets/styles/index.scss' // global css
|
||||
import '@/assets/styles/ruoyi.scss' // ruoyi css
|
||||
import App from './App'
|
||||
import store from './store'
|
||||
import router from './router'
|
||||
import directive from './directive' // directive
|
||||
import plugins from './plugins' // plugins
|
||||
import { download } from '@/utils/request'
|
||||
|
||||
import "amfe-flexible";
|
||||
|
||||
import { px2rem, px2remDirective, dictLabel } from "@/utils/px2rem";
|
||||
Vue.prototype.$px2rem = px2rem;
|
||||
Vue.prototype.$dictLabel = dictLabel;
|
||||
Vue.directive("px", px2remDirective);
|
||||
|
||||
import './assets/icons' // icon/ permission control
|
||||
import { getDicts } from "@/api/system/dict/data"
|
||||
import { getConfigKey } from "@/api/system/config"
|
||||
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi"
|
||||
// 分页组件
|
||||
import Pagination from "@/components/Pagination"
|
||||
// 自定义表格工具组件
|
||||
import RightToolbar from "@/components/RightToolbar"
|
||||
// 富文本组件
|
||||
import Editor from "@/components/Editor"
|
||||
// 文件上传组件
|
||||
import FileUpload from "@/components/FileUpload"
|
||||
// 图片上传组件
|
||||
import ImageUpload from "@/components/ImageUpload"
|
||||
// 图片预览组件
|
||||
import ImagePreview from "@/components/ImagePreview"
|
||||
// 字典标签组件
|
||||
import DictTag from '@/components/DictTag'
|
||||
// 字典数据组件
|
||||
import DictData from '@/components/DictData'
|
||||
|
||||
import leftNav from "@/components/leftNav/index.vue";
|
||||
// 全局方法挂载
|
||||
Vue.prototype.getDicts = getDicts
|
||||
Vue.prototype.getConfigKey = getConfigKey
|
||||
Vue.prototype.parseTime = parseTime
|
||||
Vue.prototype.resetForm = resetForm
|
||||
Vue.prototype.addDateRange = addDateRange
|
||||
Vue.prototype.selectDictLabel = selectDictLabel
|
||||
Vue.prototype.selectDictLabels = selectDictLabels
|
||||
Vue.prototype.download = download
|
||||
Vue.prototype.handleTree = handleTree
|
||||
|
||||
// 全局组件挂载
|
||||
Vue.component('DictTag', DictTag)
|
||||
Vue.component('Pagination', Pagination)
|
||||
Vue.component('RightToolbar', RightToolbar)
|
||||
Vue.component('Editor', Editor)
|
||||
Vue.component('FileUpload', FileUpload)
|
||||
Vue.component('ImageUpload', ImageUpload)
|
||||
Vue.component('ImagePreview', ImagePreview)
|
||||
Vue.component("leftNav", leftNav);
|
||||
|
||||
Vue.use(directive)
|
||||
Vue.use(plugins)
|
||||
DictData.install()
|
||||
|
||||
/**
|
||||
* If you don't want to use mock-server
|
||||
* you want to use MockJs for mock api
|
||||
* you can execute: mockXHR()
|
||||
*
|
||||
* Currently MockJs will be used in the production environment,
|
||||
* please remove it before going online! ! !
|
||||
*/
|
||||
|
||||
Vue.use(Element, {
|
||||
size: Cookies.get('size') || 'medium' // set element-ui default size
|
||||
})
|
||||
|
||||
Vue.config.productionTip = false
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
router,
|
||||
store,
|
||||
render: h => h(App)
|
||||
})
|
||||
|
||||
@@ -89,15 +89,7 @@ function createDashedLinesForBall(
|
||||
const line = new Line(geo, mat);
|
||||
line.computeLineDistances();
|
||||
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();
|
||||
// if (direction === "down") dir.set(0, -1, 0);
|
||||
if (direction === "back") dir.set(0, 0, -1);
|
||||
else if (direction === "left") dir.set(1, 0, 0);
|
||||
|
||||
@@ -114,7 +106,7 @@ function createDashedLinesForBall(
|
||||
arrowHelper.line.material.opacity = 0.6;
|
||||
// 设置箭头头部透明度
|
||||
arrowHelper.cone.material = new THREE.MeshBasicMaterial({
|
||||
color: "#00ff00",
|
||||
color: color,
|
||||
transparent: true, // 必须设置为true
|
||||
opacity: 0.6, // 与线段相同的透明度
|
||||
});
|
||||
@@ -448,7 +440,6 @@ const dracoLoader = new DRACOLoader().setDecoderPath("/draco/"); // 设置Draco
|
||||
const gltfLoader = new GLTFLoader().setDRACOLoader(dracoLoader); // GLTF加载器关联Draco
|
||||
|
||||
|
||||
|
||||
/* ========== 主函数:画三维坐标轴及交互 ========== */
|
||||
/**
|
||||
* 在传入的DOM元素内创建完整的三维坐标系、网格面、刻度、球体模型、交互、后处理、UI按钮等。
|
||||
@@ -605,7 +596,17 @@ export function drawAxes(element, options = {}, ballCallBack) {
|
||||
function createDom(i, axes) {
|
||||
|
||||
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')
|
||||
|
||||
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;
|
||||
const lineGeometryColors = [
|
||||
"#779c6e",
|
||||
"#779c6e",
|
||||
"#3ee4bc",
|
||||
"#ca41e7",
|
||||
"#c88d38",
|
||||
"#7467ef",
|
||||
"#c7bef7",
|
||||
"rgb(102,129,102)",
|
||||
"rgb(79,78,177)",
|
||||
"rgb(81,157,155)",
|
||||
"rgb(102,129,102)",
|
||||
"rgb(166,47,176)",
|
||||
|
||||
"rgb(166,47,176)",
|
||||
];
|
||||
const geometryColors = [
|
||||
"#888888",
|
||||
|
||||
Reference in New Issue
Block a user