Commit a2202f5f authored by 李苏's avatar 李苏 💬

调整

parent 3733123e
...@@ -148,6 +148,68 @@ export const powerRoutes = [ ...@@ -148,6 +148,68 @@ export const powerRoutes = [
] ]
}, },
{
path: '/jyfkgl',
component: "Layout",
hidden: false,
alwaysShow: true,
redirect: 'jyfkgl',
meta: {
title: "经验反馈管理",
icon: "fa-cog",
noCache: false,
link: null,
mkid: '920040000'
},
children: [
/* 基础数据 */
{
erpComponent: false,
component: 'jyfkgl/jyfkgl/index',
hidden: false,
meta: {
"title": "异物信息管理",
"icon": "",
"noCache": false,
"link": null,
"mkid": '920040100',
},
name: 'jyfkgl',
path: "jyfkgl",
}
],
},
{
path: '/ywxxgl',
component: "Layout",
hidden: false,
alwaysShow: true,
redirect: 'ywxxgl',
meta: {
title: "异物信息管理",
icon: "fa-cog",
noCache: false,
link: null,
mkid: '920050000'
},
children: [
/* 基础数据 */
{
erpComponent: false,
component: 'ywxxgl/ywxxgl/index',
hidden: false,
meta: {
"title": "异物信息管理",
"icon": "",
"noCache": false,
"link": null,
"mkid": '920050100',
},
name: 'ywxxgl',
path: "ywxxgl",
}
],
},
{ {
path: '/yhlywsytst', path: '/yhlywsytst',
component: "Layout", component: "Layout",
...@@ -159,7 +221,7 @@ export const powerRoutes = [ ...@@ -159,7 +221,7 @@ export const powerRoutes = [
icon: "fa-cog", icon: "fa-cog",
noCache: false, noCache: false,
link: null, link: null,
mkid: '920050000' mkid: '920060000'
}, },
children: [ children: [
/* 基础数据 */ /* 基础数据 */
...@@ -172,7 +234,7 @@ export const powerRoutes = [ ...@@ -172,7 +234,7 @@ export const powerRoutes = [
"icon": "", "icon": "",
"noCache": false, "noCache": false,
"link": null, "link": null,
"mkid": '920051000', "mkid": '920061000',
}, },
name: 'yhlywsytst', name: 'yhlywsytst',
path: "yhlywsytst", path: "yhlywsytst",
...@@ -213,7 +275,7 @@ export const powerRoutes = [ ...@@ -213,7 +275,7 @@ export const powerRoutes = [
component: 'sbjxgl/jxzyff/index', component: 'sbjxgl/jxzyff/index',
hidden: false, hidden: false,
meta: { meta: {
"title": "检修左右方法", "title": "检修作业方法",
"icon": "", "icon": "",
"noCache": false, "noCache": false,
"link": null, "link": null,
......
<template>
<RelDialog width="50%" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<el-row :gutter="20" :app="this">
<EditColItem :required="item.required||false" :readonly="item.readonly?true:false " v-for="(item,index) in editColItemList " :value="item.value" :span="item.span" :label="item.label" :prop='item.prop' :key="item.prop" :type="item.type" :typeConfig='item.typeConfig' :rule="item.rule" />
</el-row>
</el-form>
</RelDialog>
</template>
<script>
import {
editMixin
} from 'common'
export default {
mixins: [editMixin],
data() {
return {
editColItemList: [
{
label: '机组',
prop: 'jz',
span: 12,
type: 'input',
},
{
label: '堆型',
prop: 'dx',
span: 12,
type: 'input',
},
{
label: '时间',
prop: 'time',
span: 12,
type: 'datetime',
},
{
label: '规格型号',
prop: 'ggxh',
span: 12,
type: 'input',
},
{
label: '材质',
prop: 'cz',
span: 24,
type: 'input',
},
{
label: '异物地点',
prop: 'ywdd',
span: 24,
type: 'input',
required:true,
},
{
label: '异物排查方法',
prop: 'ywpcff',
span: 24,
type: 'textarea',
required:true,
},
{
label: '异物产生原因',
prop: 'ywcsyy',
span: 24,
type: 'textarea',
},
{
label: '备注',
prop: 'bz',
span: 24,
type: 'input'
},
]
}
}
}
</script>
<template>
<BasePage class="min_full" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<AttachFileShow :app='ctx.basePage' ></AttachFileShow>
</template>
</BasePage>
</template>
<script>
import Edit from './edit.vue'
export default {
name: 'jyfkgl',
data() {
return {
config: {
/* 基本配置*/
url: 'jyfggl/ujyfk',
tableTitle: [{
label: "机组",
prop: "jz",
fieldType: "ftString",
width: 300
},
{
label: "堆型",
prop: "dx",
fieldType: "ftString",
width: 300
},
{
label: "时间",
prop: "time",
fieldType: "ftDateTime"
},
{
label: "规格",
prop: "ggxh",
fieldType: "ftString",
width: 300
},
{
label: "材质",
prop: "cz",
fieldType: "ftString",
width: 300
},
{
label: "异物地点",
prop: "ywdd",
fieldType: "ftString",
width: 300
},
{
label: "异物排查方法",
prop: "ywpcff",
fieldType: "ftString",
width: 300
},
{
label: "异物产生原因",
prop: "ywcsyy",
fieldType: "ftString",
width: 300
},
{
label: "备注",
prop: "bz",
fieldType: "ftString",
width: 300
},
{
label: "附件数",
prop: "attachcount",
fieldType: "int"
},
{
title: "创建人",
field: "cjr",
width: 140
},
{
title: "创建时间",
field: "cjsj",
fieldType: 'ftDateTime'
},
{
title: "维护人",
field: "whr",
hidden: true
},
{
title: "维护时间",
field: "whsj",
fieldType: 'ftDateTime',
hidden: true
}
],
queryParams: [
[{
label: '编码',
prop: 'code',
span: 6,
type: 'input',
value: ''
},
{
label: '名称',
prop: 'name',
span: 6,
type: 'input',
value: ''
}
]
],
/* 默认启停用 */
}
}
},
methods: {
/* 示例*/
// demo(basePage){
// }
},
components: {
Edit
}
}
</script>
<style>
</style>
<template> <template>
<div v-loading='loading' :element-loading-text='loadingText' <div v-loading='loading' :element-loading-text='loadingText' element-loading-spinner="el-icon-loading"
element-loading-background="rgba(0, 0, 0, 0.8)" ref="app" class="min_full nullbp">
element-loading-spinner="el-icon-loading"
element-loading-background="rgba(0, 0, 0, 0.8)"
ref="app" class="min_full nullbp">
<div class="bigTitle"> <div class="bigTitle">
一回路异物溯源态势图 一回路异物溯源态势图
</div> </div>
<!-- 视角工具栏--> <!-- 视角工具栏-->
<div class="toolButton"> <div class="toolButton">
<div class="flex1 text-center"> <div class="flex1 text-center">
<span @click="reView" ><i class="el-icon-view"></i>重置视角</span> <span @click="reView"><i class="el-icon-view"></i>重置视角</span>
</div> </div>
<div class="flex1 text-center"> <div class="flex1 text-center">
<span @click="viewCenter" ><i class="el-icon-view"></i>中心视角</span> <span @click="viewCenter"><i class="el-icon-view"></i>中心视角</span>
</div> </div>
<div class="flex1 text-center"> <div class="flex1 text-center">
<span @click="clearSelected" ><i class="el-icon-circle-close"></i>清除选中</span> <span @click="clearSelected"><i class="el-icon-circle-close"></i>清除选中</span>
</div> </div>
</div> </div>
<!-- 左侧操作边框--> <!-- 左侧操作边框-->
...@@ -66,6 +63,15 @@ ...@@ -66,6 +63,15 @@
</template> </template>
<script> <script>
/*
常用遍历模型方法
this.viewer.scene.getObjectByName('1RCP002GV')
this.viewer.scene.traverse(function(obj) {
if (obj.isMesh) {
obj.material.color.set(0xffff00);
}
});
*/
import * as THREE from 'three' import * as THREE from 'three'
import gsap from 'gsap' import gsap from 'gsap'
import Viewer from '@/common/threeModules/Viewer' import Viewer from '@/common/threeModules/Viewer'
...@@ -93,7 +99,7 @@ ...@@ -93,7 +99,7 @@
} }
export default { export default {
name:'yhlywsytst', name: 'yhlywsytst',
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.app.addEventListener('dblclick', () => { this.$refs.app.addEventListener('dblclick', () => {
...@@ -105,16 +111,16 @@ ...@@ -105,16 +111,16 @@
}, },
beforeDestroy() { beforeDestroy() {
this.viewer.canRequestAnimationFrame=false this.viewer.canRequestAnimationFrame = false
}, },
data() { data() {
return { return {
selectedModel:{ selectedModel: {
name:'' name: ''
}, },
/* 加载相关动画*/ /* 加载相关动画*/
loading:true, loading: true,
loadingText:'正在加载模型,请等待!', loadingText: '正在加载模型,请等待!',
viewer: null, viewer: null,
/* 模型加载器*/ /* 模型加载器*/
modelLoader: null, modelLoader: null,
...@@ -124,33 +130,51 @@ ...@@ -124,33 +130,51 @@
} }
}, },
methods: { methods: {
clearSelected(){ clearSelected() {
this.selectedModel={name:''} // this.viewer.scene.traverse(function(obj) {
// console.log(obj,'模型对象')
// if (obj.isMesh) {
// obj.material = new THREE.MeshPhysicalMaterial({
// clearcoat: 1.0, //物体表面清漆层或者说透明涂层的厚度
// clearcoatRoughness: 0.1, //透明涂层表面的粗糙度
// color: obj.material.color, //默认颜色
// metalness: 0.9, //车外壳金属度
// roughness: 0.5, //车外壳粗糙度
// envMapIntensity: 2.5, //环境贴图对Mesh表面影响程度
// })
// }
// })
this.selectedModel = {
name: ''
}
this.reMaterialQue.forEach(item => { this.reMaterialQue.forEach(item => {
item.revert() item.revert()
}) })
}, },
viewCenter(){ viewCenter() {
this.cameraTo(this.viewer.camera.position.x, this.viewer.camera.position.y, this.viewer.camera.position.z,0,0,0) this.cameraTo(this.viewer.camera.position.x, this.viewer.camera.position.y, this.viewer.camera.position.z, 0, 0,
0)
}, },
reView(){ reView() {
this.cameraTo(0, 32, -82,0,0,0) this.cameraTo(0, 32, -82, 0, 0, 0)
}, },
init() { init() {
this.viewer = new Viewer('container',this) this.viewer = new Viewer('container', this)
this.viewer.camera.position.set(0, 32, -82) this.viewer.camera.position.set(0, 32, -82)
const manager = new THREE.LoadingManager(); const manager = new THREE.LoadingManager();
manager.onProgress = (item, loaded, total) =>{ manager.onProgress = (item, loaded, total) => {
let process=(loaded / total * 100).toFixed(2) let process = (loaded / total * 100).toFixed(2)
if(process==100){ if (process == 100) {
this.loading=false this.loading = false
} }
// 这里可以根据加载进度执行其他操作 // 这里可以根据加载进度执行其他操作
}; };
this.modelLoader = new ModelLoader(this.viewer,manager) this.modelLoader = new ModelLoader(this.viewer, manager)
this.loadAll() this.loadAll()
const lights = new Lights(this.viewer) const lights = new Lights(this.viewer)
...@@ -175,24 +199,27 @@ ...@@ -175,24 +199,27 @@
this.modelLoader.loadModelToScene('/glb/all.glb', (model) => { this.modelLoader.loadModelToScene('/glb/all.glb', (model) => {
model.object.position.set(-42, -10, 0) model.object.position.set(-42, -10, 0)
model.object.scale.set(1, 1, 1) model.object.scale.set(1, 1, 1)
},(num)=>{ }, (num) => {
let showNum=num*100 let showNum = num * 100
if(showNum==100){ if (showNum == 100) {
this.loadingText=`模型加载完毕,请稍等!` this.loadingText = `模型加载完毕,请稍等!`
}else{ } else {
this.loadingText=`正在加载模型${showNum}%!` this.loadingText = `正在加载模型${showNum}%!`
} }
/* */ /* */
}) })
}, },
loadDm(){ loadDm() {
const geometry = new THREE.PlaneGeometry(1000, 1000, 500, 500); // 创建一个100x100的平面,水平和垂直各10条线 const geometry = new THREE.PlaneGeometry(1000, 1000, 500, 500); // 创建一个100x100的平面,水平和垂直各10条线
const material = new THREE.LineBasicMaterial({ color: 0x585858, linewidth: 0.5 }); const material = new THREE.LineBasicMaterial({
color: 0x585858,
linewidth: 0.5
});
const grid = new THREE.LineSegments(geometry, material); const grid = new THREE.LineSegments(geometry, material);
grid.rotation.x = -Math.PI / 2; // 旋转网格,使其平铺在x-z平面上 grid.rotation.x = -Math.PI / 2; // 旋转网格,使其平铺在x-z平面上
grid.position.y = -18; // 将网格向下移动一点,使其位于底部 grid.position.y = -18; // 将网格向下移动一点,使其位于底部
grid.name='地面' grid.name = '地面'
this.viewer.scene.add(grid); this.viewer.scene.add(grid);
}, },
/* 点击*/ /* 点击*/
...@@ -209,11 +236,12 @@ ...@@ -209,11 +236,12 @@
const intersects = rayCaster.intersectObject(this.viewer.scene, true) // 计算物体和射线的焦点 const intersects = rayCaster.intersectObject(this.viewer.scene, true) // 计算物体和射线的焦点
if (intersects[0]) { if (intersects[0]) {
console.log(intersects[0]) console.log(intersects[0])
if(intersects[0].object.name=='地面'){ if (intersects[0].object.name == '地面') {
return return
} }
const model = intersects[0].object const model = intersects[0].object
this.selectedModel=model this.selectedModel = model
/* 执行并情况材料队列 */ /* 执行并情况材料队列 */
this.reMaterialQue.forEach(item => { this.reMaterialQue.forEach(item => {
item.revert() item.revert()
...@@ -242,7 +270,7 @@ ...@@ -242,7 +270,7 @@
let point = intersects[0].point let point = intersects[0].point
let finallyPoint = this.getCameraPosition(24, point) let finallyPoint = this.getCameraPosition(24, point)
this.cameraTo(finallyPoint.x, finallyPoint.y, finallyPoint.z,point.x,point.y,point.z) this.cameraTo(finallyPoint.x, finallyPoint.y, finallyPoint.z, point.x, point.y, point.z)
} }
}) })
...@@ -287,7 +315,7 @@ ...@@ -287,7 +315,7 @@
return cameraPosition; return cameraPosition;
}, },
/* 封装相机转向方法动画*/ /* 封装相机转向方法动画*/
cameraTo(x, y, z,px,py,pz) { cameraTo(x, y, z, px, py, pz) {
let _camera = this.viewer.camera let _camera = this.viewer.camera
let currentPosition = _camera.position.clone(); let currentPosition = _camera.position.clone();
let oldx = currentPosition.x let oldx = currentPosition.x
...@@ -296,8 +324,8 @@ ...@@ -296,8 +324,8 @@
let coldx = this.viewer.controls.target.x let coldx = this.viewer.controls.target.x
let coldy = this.viewer.controls.target.y let coldy = this.viewer.controls.target.y
let coldz = this.viewer.controls.target.z let coldz = this.viewer.controls.target.z
let viewer =this.viewer let viewer = this.viewer
console.log(coldx,coldy,coldz) console.log(coldx, coldy, coldz)
/* 计算过渡差值*/ /* 计算过渡差值*/
let tl = gsap.timeline(); let tl = gsap.timeline();
tl.to({}, { tl.to({}, {
...@@ -305,9 +333,11 @@ ...@@ -305,9 +333,11 @@
ease: "power1.inOut", // 缓动函数 ease: "power1.inOut", // 缓动函数
onUpdate: function() { onUpdate: function() {
let progress = this.progress(); // 获取当前进度(0到1之间) let progress = this.progress(); // 获取当前进度(0到1之间)
_camera.position.set(oldx + (x - oldx) * progress, oldy + (y - oldy) * progress, oldz + (z - oldz) * progress); _camera.position.set(oldx + (x - oldx) * progress, oldy + (y - oldy) * progress, oldz + (z - oldz) *
progress);
viewer.controls.target.set(coldx + (px - coldx) * progress, coldy + (py - coldy) * progress, coldz + (pz - coldz) *progress) viewer.controls.target.set(coldx + (px - coldx) * progress, coldy + (py - coldy) * progress, coldz + (
pz - coldz) * progress)
} }
...@@ -355,7 +385,8 @@ ...@@ -355,7 +385,8 @@
height: 85%; height: 85%;
z-index: 12; z-index: 12;
} }
.toolButton{
.toolButton {
display: flex; display: flex;
margin-top: 18px; margin-top: 18px;
position: absolute; position: absolute;
...@@ -368,7 +399,8 @@ ...@@ -368,7 +399,8 @@
font-size: 13px; font-size: 13px;
// background-color: #07417a; // background-color: #07417a;
} }
.toolButton span{
.toolButton span {
cursor: pointer; cursor: pointer;
} }
...@@ -446,10 +478,11 @@ ...@@ -446,10 +478,11 @@
box-shadow: inset 0 0 30px #07417a; box-shadow: inset 0 0 30px #07417a;
/*position: relative;*/ /*position: relative;*/
} }
/* 调整*/ /* 调整*/
.optTitle{ .optTitle {
position: absolute; position: absolute;
background-color:rgba(28, 144, 198, 0.7); background-color: rgba(28, 144, 198, 0.7);
height: 40px; height: 40px;
width: 100%; width: 100%;
line-height: 40px; line-height: 40px;
......
<template>
<RelDialog width="50%" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<el-row :gutter="20" :app="this">
<EditColItem :required="item.required||false" :readonly="item.readonly?true:false " v-for="(item,index) in editColItemList " :value="item.value" :span="item.span" :label="item.label" :prop='item.prop' :key="item.prop" :type="item.type" :typeConfig='item.typeConfig' :rule="item.rule" />
</el-row>
</el-form>
</RelDialog>
</template>
<script>
import {
editMixin
} from 'common'
export default {
mixins: [editMixin],
data() {
return {
editColItemList: [
{
label: '编码',
prop: 'code',
span: 12,
type: 'input',
required:true,
},
{
label: '名称',
prop: 'name',
span: 12,
type: 'input',
required:true,
},
{
label: '备注',
prop: 'bz',
span: 24,
type: 'input'
},
]
}
}
}
</script>
<template>
<BasePage class="min_full" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">示例按钮</el-button> -->
</template>
</BasePage>
</template>
<script>
import Edit from './edit.vue'
export default {
name: 'jxzyff',
data() {
return {
config: {
/* 基本配置*/
url: 'yhlywpc/ujyfk',
tableTitle: [{
label: "机组",
prop: "jz",
fieldType: "ftString",
width: 300
},
{
label: "堆型",
prop: "dx",
fieldType: "ftString",
width: 300
},
{
label: "时间",
prop: "time",
fieldType: "ftDateTime"
},
{
label: "规格",
prop: "ggxh",
fieldType: "ftString",
width: 300
},
{
label: "材质",
prop: "cz",
fieldType: "ftString",
width: 300
},
{
label: "异物地点",
prop: "ywdd",
fieldType: "ftString",
width: 300
},
{
label: "异物排查方法",
prop: "ywpcff",
fieldType: "ftString",
width: 300
},
{
label: "异物产生原因",
prop: "ywcsyy",
fieldType: "ftString",
width: 300
},
{
label: "备注",
prop: "bz",
fieldType: "ftString",
width: 300
},
{
label: "附件数",
prop: "attachcount",
fieldType: "int"
},
{
title: "创建人",
field: "cjr",
width: 140
},
{
title: "创建时间",
field: "cjsj",
fieldType: 'ftDateTime'
},
{
title: "维护人",
field: "whr",
hidden: true
},
{
title: "维护时间",
field: "whsj",
fieldType: 'ftDateTime',
hidden: true
}
],
queryParams: [
[{
label: '编码',
prop: 'code',
span: 6,
type: 'input',
value: ''
},
{
label: '名称',
prop: 'name',
span: 6,
type: 'input',
value: ''
}
]
],
/* 默认启停用 */
}
}
},
methods: {
/* 示例*/
// demo(basePage){
// }
},
components: {
Edit
}
}
</script>
<style>
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment