From 5d125d08755e41a7c231dfa36fdd241fbbf675b2 Mon Sep 17 00:00:00 2001 From: shijing Date: Tue, 21 Nov 2023 09:25:43 +0800 Subject: [PATCH] daogangjilu --- src/api/model/mtm.js | 26 + src/config/route.js | 22 +- src/views/bigScreen/index_photon.vue | 1907 ++++++++++++++++++++------ src/views/bigScreen/textIndex.vue | 97 +- src/views/hrm/attendance.vue | 73 +- src/views/hrm/attendance_form.vue | 156 ++- src/views/hrm/team_form.vue | 208 +-- src/views/hrm/team_photon.vue | 4 +- 8 files changed, 1827 insertions(+), 666 deletions(-) diff --git a/src/api/model/mtm.js b/src/api/model/mtm.js index ed5a9dc3..5bb99030 100644 --- a/src/api/model/mtm.js +++ b/src/api/model/mtm.js @@ -400,4 +400,30 @@ export default { }, }, + teammember:{ + list: { + name: "班组列表", + req: async function(data){ + return await http.get( + `${config.API_URL}/mtm/teammember/`, + data + ); + } + }, + create: { + name: "创建", + req: async function(data){ + return await http.post( + `${config.API_URL}/mtm/teammember/`, + data); + } + }, + delete: { + name: "删除", + req: async function(id){ + return await http.delete( + `${config.API_URL}/mtm/teammember/${id}/`); + } + }, + } } \ No newline at end of file diff --git a/src/config/route.js b/src/config/route.js index 5d17c7a2..11f2ba40 100644 --- a/src/config/route.js +++ b/src/config/route.js @@ -1961,17 +1961,17 @@ const routes = [ }, "component": "bigScreen/index_photon" }, - { - "path": "/bigScreenP2", - "name": "bigScreenP2", - "meta": { - "title": "数据看板2", - "icon": "el-icon-platform", - "perms": ["bigScreenP"], - "fullpage": true, - }, - "component": "bigScreen/textIndex" - }, + // { + // "path": "/bigScreenP2", + // "name": "bigScreenP2", + // "meta": { + // "title": "数据看板2", + // "icon": "el-icon-platform", + // "perms": ["bigScreenP"], + // "fullpage": true, + // }, + // "component": "bigScreen/textIndex" + // }, //车间看板 { "path": "/bigScreenP_10", diff --git a/src/views/bigScreen/index_photon.vue b/src/views/bigScreen/index_photon.vue index b650c11f..2027f4eb 100644 --- a/src/views/bigScreen/index_photon.vue +++ b/src/views/bigScreen/index_photon.vue @@ -1,424 +1,1384 @@ \ No newline at end of file diff --git a/src/views/bigScreen/textIndex.vue b/src/views/bigScreen/textIndex.vue index f50036c5..77e9d169 100644 --- a/src/views/bigScreen/textIndex.vue +++ b/src/views/bigScreen/textIndex.vue @@ -104,7 +104,7 @@
-

10车间

+

{{dialogData.deptName}}

-

总量

+

昨日产量

390

-

总量

-

120

+

预制管

+

390

-

总量

-

130

+

预制棒

+

390

-
+
@@ -174,7 +174,7 @@ export default { }, initialAlpha: -Math.PI / 4.5, initialBeta: Math.PI / 2, - initialRadius: 3, + initialRadius: 2.5, initialTarget: null, scene: null, myui: null, @@ -185,11 +185,11 @@ export default { infoVisibel: false, updateTime: '2023-08-17 16:00:00', nodesLists: { - '单身宿舍.005_primitive3': { total: '0', elec: '0', name: '办公楼' }, - '立方体.015_primitive1': { total: '0', elec: '0', name: '加工车间' }, - '立方体.004_primitive1': { total: '0', elec: '0', name: '配料车间' }, - '立方体.003_primitive1': { total: '0', elec: '0', name: '成型车间' }, - '立立方体.002_primitive1': { total: '0', elec: '0', name: '成型车间' }, + '单身宿舍.004_primitive3': { total: '0', elec: '0', name: '办公楼' }, + '立方体.024_primitive1': { total: '0', elec: '0', name: '成型10车间' }, + '立方体.034_primitive1': { total: '0', elec: '0', name: '配料8车间' }, + '立方体.026_primitive1': { total: '0', elec: '0', name: '成型7车间' }, + '立方体.025_primitive1': { total: '0', elec: '0', name: '加工6车间' }, }, currentTime:'', currentWeek:'', @@ -197,6 +197,9 @@ export default { timerTime:null, start_date:'', end_date:'', + dialogData:{ + deptName:'办公楼' + }, } }, mounted() { @@ -307,7 +310,7 @@ export default { camera.upperRadiusLimit = 6; // 灯光 const light = new BABYLON.HemisphericLight("light", new BABYLON.Vector3(1, 1, 0)); - light.intensity = 0.3; + light.intensity = 0.8; // 全屏GUI const advancedTexture = BABYLON_GUI.AdvancedDynamicTexture.CreateFullscreenUI("myUI"); that.myui = advancedTexture; @@ -443,7 +446,6 @@ export default { highlightLayer.removeAllMeshes(); } if (pickResult.hit) { - // console.log('pickResult',pickResult); const mesh = pickResult.pickedMesh; // if (camera.target != mesh.position) { // // console.log('fly to') @@ -463,17 +465,9 @@ export default { // BABYLON.Animation.CreateAndStartAnimation('at51', camera, 'target', 45, 200, camera.target, position, 0, ease); // } highlightLayer.removeAllMeshes(); - // if(/.*[\u4e00-\u9fa5]+.*$/.test(mesh.name)&&mesh.name!=='地面1'&&mesh.name!=='绿地'&&mesh.name!=='停车场') { - // // 在选中的 mesh 上添加高亮效果 - // highlightLayer.addMesh(mesh, new BABYLON.Color3(1, 1, 0.5)); - // that.currentLightMesh = mesh; - // mesh_rect.linkWithMesh(mesh); - // let name = mesh.name.split('_')[0]; - // mesh_name.text = name; - // mesh_rect.isVisible = true; - // that.infoVisibel = true; - // } - if (mesh.name == '单身宿舍.004_primitive3') { + let key = mesh.name; + if (that.nodesLists[key]) { + that.getDeptDetail(that.nodesLists[key].name) //单身宿舍.003_primitive3 // 在选中的 mesh 上添加高亮效果 highlightLayer.addMesh(mesh, new BABYLON.Color3(0.1, 0.9, 0.9)); @@ -501,62 +495,30 @@ export default { that.infoVisibel = false; } }); - canvas.addEventListener('mousedown', (event) => { + canvas.addEventListener('click', (event) => { // 使用 scene.pick 检测鼠标拾取 const pickResult = scene.pick(scene.pointerX, scene.pointerY); if (pickResult.hit) { - console.log('000000000000'); - console.log('pickResult', pickResult); const mesh = pickResult.pickedMesh; if (camera.target != mesh.position) { - // console.log('fly to') + console.log('fly to') // 计算新的相机位置 let position = mesh._parentNode._position if (mesh._parentNode.id == '__root__') { position = mesh.position } const cameraPosition = new BABYLON.Vector3( - mesh.position.x + 9 * Math.sin(camera.beta) * Math.cos(Math.PI), - mesh.position.y + 9 * Math.cos(camera.beta), - mesh.position.z + 9 * Math.sin(camera.beta) * Math.sin(Math.PI) + mesh.position.x + 2.5 * Math.sin(camera.beta) * Math.cos(1.8*Math.PI), + mesh.position.y + 2.5 * Math.cos(camera.beta), + mesh.position.z + 2.5 * Math.sin(camera.beta) * Math.sin(1.8*Math.PI) ); var ease = new BABYLON.CubicEase(); ease.setEasingMode(BABYLON.EasingFunction.EASINGMODE_EASEINOUT); - BABYLON.Animation.CreateAndStartAnimation('at5', camera, 'position', 45, 200, camera.position, cameraPosition, 0, ease); + BABYLON.Animation.CreateAndStartAnimation('meshclick', camera, 'position', 45, 200, camera.position, cameraPosition, 0,ease); BABYLON.Animation.CreateAndStartAnimation('at51', camera, 'target', 45, 200, camera.target, position, 0, ease); } } }); - // checkbox.isChecked = true; //默认开启自动旋转 - // scene.onPointerObservable.add((pointerInfo) => { - // switch (pointerInfo.type) { - // case BABYLON.PointerEventTypes.POINTERDOWN: - // console.log(scene.pointerX, scene.pointerY); - // const pickResult = scene.pick(scene.pointerX, scene.pointerY); - // if (pickResult.hit) { - // console.log('000000000000'); - // console.log('pickResult', pickResult); - // const mesh = pickResult.pickedMesh; - // if (camera.target != mesh.position) { - // // console.log('fly to') - // // 计算新的相机位置 - // let position = mesh._parentNode._position - // if (mesh._parentNode.id == '__root__') { - // position = mesh.position - // } - // const cameraPosition = new BABYLON.Vector3( - // mesh.position.x + 9 * Math.sin(camera.beta) * Math.cos(Math.PI), - // mesh.position.y + 9 * Math.cos(camera.beta), - // mesh.position.z + 9 * Math.sin(camera.beta) * Math.sin(Math.PI) - // ); - // var ease = new BABYLON.CubicEase(); - // ease.setEasingMode(BABYLON.EasingFunction.EASINGMODE_EASEINOUT); - // BABYLON.Animation.CreateAndStartAnimation('at5', camera, 'position', 45, 200, camera.position, cameraPosition, 0, ease); - // BABYLON.Animation.CreateAndStartAnimation('at51', camera, 'target', 45, 200, camera.target, position, 0, ease); - // } - // } - // } - // }) return scene; }; const scene = createScene(); //Call the createScene function @@ -571,6 +533,9 @@ export default { engine.resize(); }); }, + getDeptDetail(name){ + this.dialogData.deptName = name; + }, initChart() { //左1 let chartDom = document.getElementById('line1'); @@ -1501,7 +1466,7 @@ export default { display: flex; .leftBlock { - width: 80px; + width: 100px; margin-right: 30px; } diff --git a/src/views/hrm/attendance.vue b/src/views/hrm/attendance.vue index 59ee9a43..ca498164 100644 --- a/src/views/hrm/attendance.vue +++ b/src/views/hrm/attendance.vue @@ -48,11 +48,16 @@ row-key="id" stripe > - + + - + - + + + + + @@ -61,15 +66,16 @@ {{states[scope.row.state].label}} - + -