diff --git a/.env.production b/.env.production index 604c6f24..deb57ef0 100644 --- a/.env.production +++ b/.env.production @@ -2,9 +2,9 @@ NODE_ENV = production # 标题 -VUE_APP_TITLE = '曲阳金隅安全智能管控平台' +# VUE_APP_TITLE = '曲阳金隅安全智能管控平台' # VUE_APP_TITLE = '托克逊能源管理平台' -# VUE_APP_TITLE = '中建材光子科技有限公司' +VUE_APP_TITLE = '中建材光子科技有限公司' # 接口地址 diff --git a/public/img/gz_login_img.png b/public/img/gz_login_img.png new file mode 100644 index 00000000..a04bd500 Binary files /dev/null and b/public/img/gz_login_img.png differ diff --git a/public/img/gz_logo.png b/public/img/gz_logo.png new file mode 100644 index 00000000..e665c867 Binary files /dev/null and b/public/img/gz_logo.png differ diff --git a/public/index.html b/public/index.html index 881a32cb..140f0fea 100644 --- a/public/index.html +++ b/public/index.html @@ -32,7 +32,8 @@
<%= VUE_APP_TITLE %>
diff --git a/src/api/model/pm.js b/src/api/model/pm.js index 0242b2a6..1e07a0cf 100644 --- a/src/api/model/pm.js +++ b/src/api/model/pm.js @@ -60,6 +60,14 @@ export default { ); } }, + related: { + name: "获取已下达的所有的兄弟小任务", + req: async function(id){ + return await http.get( + `${config.API_URL}/pm/mtask/${id}/related/` + ); + } + }, submitSameDay:{ name: "提交同一天的该部门下的所有兄弟小任务", req: async function(data){ @@ -69,8 +77,17 @@ export default { ); } }, + submit:{ + name: "提交任务后不可更新日志", + req: async function(data){ + return await http.post( + `${config.API_URL}/pm/mtask/submit/`, + data + ); + } + }, }, - // 生产小任务 + // 生产大任务 utask: { list: { name: "生产任务列表", diff --git a/src/api/model/wpm.js b/src/api/model/wpm.js index d065f48c..f570412e 100644 --- a/src/api/model/wpm.js +++ b/src/api/model/wpm.js @@ -190,13 +190,23 @@ export default { }, //车间库存 wmaterial: { - name: "车间库存", - req: async function(data){ - return await http.get( - `${config.API_URL}/wpm/wmaterial/`, - data - ); - } + list: { + name: "车间库存", + req: async function(data){ + return await http.get( + `${config.API_URL}/wpm/wmaterial/`, + data + ); + } + }, + batchs: { + name: "获取车间出现过的批次号", + req: async function(data){ + return await http.post( + `${config.API_URL}/wpm/wmaterial/batchs/`, + data); + } + }, }, // //值班停机关系 // stsflog: { diff --git a/src/components/ehsSelect/userselect.vue b/src/components/ehsSelect/userselect.vue index 7b8dca8b..b413fd68 100644 --- a/src/components/ehsSelect/userselect.vue +++ b/src/components/ehsSelect/userselect.vue @@ -333,10 +333,19 @@ export default { // }, rowClick(row, column, event){ if(!this.multiple){ + if(this.listIndex!==null){ + data. + this.choseData = row; + this.choseData.listIndex = this.listIndex; + this.$emit("submit", this.choseData); + this.dialoguser=false + }else{ this.choseData = row; this.$emit("submit", this.choseData); this.dialoguser=false } + + } }, //表格选择后回调事件 selectionChange(selection) { diff --git a/src/components/scTable/index.vue b/src/components/scTable/index.vue index 64513a41..43217e7b 100644 --- a/src/components/scTable/index.vue +++ b/src/components/scTable/index.vue @@ -143,7 +143,7 @@ export default { order: null, loading: false, tableHeight: "100%", - tableParams: Object.assign({}, this.params), + tableParams: this.params, userColumn: [], customColumnShow: false, summary: {}, diff --git a/src/config/route.js b/src/config/route.js index 16fc15ad..3bad0a4d 100644 --- a/src/config/route.js +++ b/src/config/route.js @@ -794,7 +794,8 @@ const routes = [ "meta": { "title": "生产一部记录", "icon": "el-icon-cellphone", - "perms": ["wpm"] + "perms": ["wpm"], + "hidden":true }, "component": "wpm/worktaskFlog" }, @@ -1765,7 +1766,7 @@ const routes = [ "meta": { "title": "菜单管理", "icon": "el-icon-fold", - "perms": ["menu"] + "perms": ["menu"] }, "component": "ops/menu" }, @@ -1815,7 +1816,7 @@ const routes = [ "meta": { "title": "配置", "icon": "el-icon-document", - "perms": ["ops"] + "perms": ["sysconfig"] }, "component": "ops/setting" }, @@ -1847,12 +1848,36 @@ const routes = [ }, "component": "bigScreen/index_enm" }, - //光子大屏 + //光子——数据看板 { "path": "/bigScreenP", "name": "bigScreenP", "meta": { - "title": "能管大屏", + "title": "数据看板", + "icon": "el-icon-position", + "perms": ["bigScreenP"], + "fullpage": true, + }, + "component": "bigScreen/index_photon" + }, + //车间看板 + { + "path": "/bigScreenP", + "name": "bigScreenP", + "meta": { + "title": "车间看板", + "icon": "el-icon-position", + "perms": ["bigScreenP"], + "fullpage": true, + }, + "component": "bigScreen/index_photon" + }, + //统计分析 + { + "path": "/bigScreenP", + "name": "bigScreenP", + "meta": { + "title": "统计分析", "icon": "el-icon-position", "perms": ["bigScreenP"], "fullpage": true, diff --git a/src/layout/index.vue b/src/layout/index.vue index a36c6281..bba289a5 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -205,7 +205,7 @@ import setting from './components/setting.vue'; import iframeView from './components/iframeView.vue'; import autoExit from './other/autoExit.js'; - + import data from './../utils/baseJson'; export default { name: 'index', components: { @@ -229,12 +229,15 @@ }, computed:{ baseName(){ - let baseName = this.$TOOL.data.get("BASE_INFO")!==null?this.$TOOL.data.get("BASE_INFO").base.base_name:'智能管理平台'; + let baseInFo = data[data.current]; + // let baseName = this.$TOOL.data.get("BASE_INFO")!==null?this.$TOOL.data.get("BASE_INFO").base.base_name:'智能管理平台'; + let baseName = baseInFo!==null?baseInFo.base.base_name:'智能管理平台'; return baseName; }, baseLogo(){ - let base_logo = this.$TOOL.data.get("BASE_INFO")!==null?this.$TOOL.data.get("BASE_INFO").base.base_logo:'img/logo.png'; - + let baseInFo = data[data.current]; + // let base_logo = this.$TOOL.data.get("BASE_INFO")!==null?this.$TOOL.data.get("BASE_INFO").base.base_logo:'img/logo.png'; + let base_logo = baseInFo!==null?baseInFo.base.base_logo:'img/logo.png'; return base_logo }, ismobile(){ diff --git a/src/utils/baseJson.json b/src/utils/baseJson.json index 5f092b79..7fd238a8 100644 --- a/src/utils/baseJson.json +++ b/src/utils/baseJson.json @@ -5,7 +5,8 @@ "base_name": "托克逊能化绿色建材厂能源管理平台", "base_logo": "/media/default/logo.png", "base_name_short": "托克逊能管", - "base_logo_side": "/media/default/logo_side.jpg" + "base_logo_side": "/media/default/logo_side.jpg", + "name":"enm" }, "apk": { "apk_version": "1.01.44", @@ -17,8 +18,10 @@ "base": { "base_name": "中建材光子科技有限公司", "base_logo": "/media/default/gz_logo.png", + "base_login_img":"/media/default/gz_login_img.png", "base_name_short": "光子科技", - "base_logo_side": "/media/default/logo_side.jpg" + "base_logo_side": "/media/default/logo_side.jpg", + "name":"photon" } } } \ No newline at end of file diff --git a/src/views/bigScreen/index_photon.vue b/src/views/bigScreen/index_photon.vue index 8daa6355..b650c11f 100644 --- a/src/views/bigScreen/index_photon.vue +++ b/src/views/bigScreen/index_photon.vue @@ -259,7 +259,7 @@ export default { const createScene = function () { const scene = new BABYLON.Scene(engine); scene.clearColor = BABYLON.Color3.Black(); //BABYLON.Color3(1, 0, 1); - const ground = BABYLON.MeshBuilder.CreateGround("ground", { width: 50, height: 50 }); + const ground = BABYLON.MeshBuilder.CreateGround("ground", { width: 30, height: 30 }); const groundMaterial = new BABYLON_GRID.GridMaterial("groundMaterial", scene); groundMaterial.majorUnitFrequency = 5; groundMaterial.minorUnitVisibility = 0.5; @@ -272,19 +272,19 @@ export default { const largeGroundMat = new BABYLON.StandardMaterial("largeGroundMat"); largeGroundMat.diffuseTexture = new BABYLON.Texture("url to large ground texture"); - const largeGround = BABYLON.MeshBuilder.CreateGroundFromHeightMap("largeGround", "https://assets.babylonjs.com/environments/villageheightmap.png", {width:50, height:50, subdivisions: 200, minHeight:0, maxHeight: 2}); - largeGround.material = groundMaterial; - largeGround.position.y = -0.1; + // const largeGround = BABYLON.MeshBuilder.CreateGroundFromHeightMap("largeGround", "https://assets.babylonjs.com/environments/villageheightmap.png", {width:50, height:50, subdivisions: 200, minHeight:0, maxHeight: 2}); + // largeGround.material = groundMaterial; + // largeGround.position.y = -0.1; // 加载背景图片 // const backgroundImage = new BABYLON.Layer('', 'img/bj.png', scene, true); - const camera = new BABYLON.ArcRotateCamera("camera", that.initialAlpha, that.initialBeta, that.initialRadius, new BABYLON.Vector3(0, 0, 0)); + const camera = new BABYLON.ArcRotateCamera("camera", that.initialAlpha, that.initialBeta, that.initialRadius, new BABYLON.Vector3(0,-0.2, -0.1)); that.initialTarget = camera.getTarget(); - camera.lowerBetaLimit = Math.PI / 2.6; //无法移动到地面以下 - camera.upperBetaLimit = Math.PI / 2.1; //无法移动到地面以下 + // camera.lowerBetaLimit = Math.PI / 2.6; //无法移动到地面以下 + camera.upperBetaLimit = Math.PI / 2.6; //无法移动到地面以下 camera.attachControl(canvas, true); - camera.maxZ = 200; // 调整适当的值 + camera.maxZ = 100; // 调整适当的值 // 相机限制 camera.lowerRadiusLimit = 2; camera.upperRadiusLimit = 4; @@ -340,7 +340,7 @@ export default { mesh_name.color = 'white'; mesh_name.fontSize = '14px'; mesh_rect.addControl(mesh_name); - var remoteGlbUrl = process.env.VUE_APP_BASEURL + "/media/model/photon.glb"; + var remoteGlbUrl = process.env.VUE_APP_BASEURL + "/media/model/photon1.glb"; BABYLON.SceneLoader.Append(remoteGlbUrl, "", scene, function (scene) { engine.hideLoadingUI() }, diff --git a/src/views/em/equipment.vue b/src/views/em/equipment.vue index 3add5716..323f3088 100644 --- a/src/views/em/equipment.vue +++ b/src/views/em/equipment.vue @@ -73,7 +73,7 @@ 编辑 @@ -81,7 +81,7 @@ 删除 diff --git a/src/views/em/equipmentc.vue b/src/views/em/equipmentc.vue index aa2cfa95..9fff45dd 100644 --- a/src/views/em/equipmentc.vue +++ b/src/views/em/equipmentc.vue @@ -74,13 +74,13 @@ - + @@ -91,7 +91,6 @@ import { index } from 'd3'; emits: ["success", "closed"], props:{ mtask: { type: String, default: '' }, - materialId: { type: String, default: '' }, }, data() { return { @@ -125,16 +124,19 @@ import { index } from 'd3'; }; }, mounted() { - this.getProcess(); + this.getBatchs(); this.getFormList(); }, methods: { getFormList(){ - this.$API.mtm.route.list.req({page:0,material:this.materialId}).then((res) => { - res.forEach(item=>{ + this.$API.pm.mtask.related.req(this.mtask).then(res=>{ + // debugger; + console.log('工序进度') + console.log(res) + res.forEach(item=>{ let obj = { - process: item.process, - processName: item.process_name, + process: item.mgroup, + processName: item.mgroup_name, count_use:1, count_ok: 1, count_no1: 0, @@ -148,10 +150,12 @@ import { index } from 'd3'; }) }) }, - //获取工序列表 - getProcess(){ - var res = this.$API.mtm.process.list.req({page:0}).then(res=>{ - this.options = res; + //获取车间物料批次号 + getBatchs(){ + let that = this; + this.$API.wpm.wmaterial.batchs.req({belong_dept_name:'6车间'}).then(res=>{ + that.options = res; + console.log(res) }); }, pushRow(){ diff --git a/src/views/wpm/worktask.vue b/src/views/wpm/worktask.vue index 2aa8a3a0..f90cd971 100644 --- a/src/views/wpm/worktask.vue +++ b/src/views/wpm/worktask.vue @@ -1,269 +1,333 @@