| | |
| | | * @Author: lzhe lzhe@example.com |
| | | * @Date: 2024-03-26 10:28:33 |
| | | * @LastEditors: lzhe lzhe@example.com |
| | | * @LastEditTime: 2024-10-07 00:49:07 |
| | | * @LastEditTime: 2024-10-23 10:34:29 |
| | | * @FilePath: /smart-web/src/views/master/person/main/index.vue |
| | | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |
| | | --> |
| | |
| | | </div> |
| | | <div class="aposcope-right"> |
| | | <div class="content-machine-box"> |
| | | <div class="content-machine-img"><img src="./station.png" alt=""></div> |
| | | <div class="content-machine-img"><img :src="stationForm.avatar" alt=""></div> |
| | | <div class="content-machine-detail"> |
| | | <div class="content-machine-name">{{stationForm.machineName}}</div> |
| | | <el-form :model="stationForm" ref="dialogForm" label-width="80px" label-position="center" style="width: 100%;"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="fact-analysis-card" v-for="item in dmpList" v-if="dmpList.length != 0"> |
| | | <div class="card-name" :style="{'background-color': item.color}">{{item.description}}</div> |
| | | <div class="card-name" :style="{'background-color': item.color}">{{item.dpLabel}}</div> |
| | | <div :class="{'card-value': true,'card-value-bg1':item.name != 'Alarm','card-value-bg2':item.name == 'Alarm'}">{{item.codeName}}</div> |
| | | </div> |
| | | </div> |
| | |
| | | <save-dialog v-if="dialog.save" ref="saveDialog" @success="addfeedbackSuccess" :workstationId="lastLevelId" @closed="dialog.save=false"></save-dialog> |
| | | </template> |
| | | <script> |
| | | import station from "./station.png"; |
| | | import moment from 'moment' |
| | | import * as echarts from 'echarts'; |
| | | import saveDialog from './add-station-status' |
| | |
| | | this.alarmsearchBtn(); |
| | | }, |
| | | alarmsearchBtn() { |
| | | this.$HTTP.get(`/api/blade-mdc/work-station-analysis/alarm/${this.lastLevelId}?current=${this.alarmsearchData.current}&size=${this.alarmsearchData.size}`).then(res=> { |
| | | this.$HTTP.get(`/api/mdc/work-station-analysis/alarm/${this.lastLevelId}?current=${this.alarmsearchData.current}&size=${this.alarmsearchData.size}`).then(res=> { |
| | | if(res.code == 200) { |
| | | this.alarmtableData = res.data.records; |
| | | this.alarmtotal = res.data.total; |
| | |
| | | humanFeedback: this.humanFeedback, |
| | | workstationId: this.lastLevelId |
| | | } |
| | | this.$HTTP.post(`/api/blade-mdc/status-record/shift-index-status-record-table`,obj).then(res=> { |
| | | this.$HTTP.post(`/api/mdc/status-record/shift-index-status-record-table`,obj).then(res=> { |
| | | if(res.code == 200) { |
| | | var defaultValues = { |
| | | oee: 0, |
| | |
| | | humanFeedback: this.humanFeedback, |
| | | workstationId: this.lastLevelId |
| | | } |
| | | this.$HTTP.post(`/api/blade-mdc/status-record/shift-index-status-record-chart`,obj).then(res=> { |
| | | this.$HTTP.post(`/api/mdc/status-record/shift-index-status-record-chart`,obj).then(res=> { |
| | | if(res.code == 200) { |
| | | var yAxisData = []; |
| | | var newData = []; |
| | |
| | | humanFeedback: this.humanFeedback, |
| | | workstationId: this.lastLevelId |
| | | } |
| | | this.$HTTP.post(`/api/blade-mdc/status-record/time-distribution`,obj).then(res=> { |
| | | this.$HTTP.post(`/api/mdc/status-record/time-distribution`,obj).then(res=> { |
| | | if(res.code == 200) { |
| | | var myChart = echarts.init(document.getElementById('wcs-left')); |
| | | var wcsOption = JSON.parse(JSON.stringify(this.wcsBeginOption)); |
| | |
| | | }) |
| | | }, |
| | | getwcsLcolor() { |
| | | this.$HTTP.get(`/api/blade-cps/global_wcs/list?code=&name=`).then(res=> { |
| | | this.$HTTP.get(`/api/smis/global_wcs/list?code=&name=`).then(res=> { |
| | | if(res.code == 200) { |
| | | res.data.forEach(item=> { |
| | | item.itemStyle = {color: item.color}; |
| | |
| | | humanFeedback: this.humanFeedback, |
| | | workstationId: this.lastLevelId |
| | | } |
| | | this.$HTTP.post(`/api/blade-mdc/status-record/equipment-efficiency`,obj).then(res=> { |
| | | this.$HTTP.post(`/api/mdc/status-record/equipment-efficiency`,obj).then(res=> { |
| | | if(res.code == 200) { |
| | | var myChart = echarts.init(document.getElementById('wcs-right')); |
| | | res.data.forEach(item=> { |
| | |
| | | handleNodeClick(data) { |
| | | if(data.code) { |
| | | this.lastLevelId = data.id; |
| | | this.$HTTP.get(`/api/blade-cps/workstation/get?workstationId=${this.lastLevelId}`).then(res=> { |
| | | this.$HTTP.get(`/api/smis/workstation/get?workstationId=${this.lastLevelId}`).then(res=> { |
| | | if(res.code == 200) { |
| | | if(res.data.avatar == "") { |
| | | res.data.avatar = station; |
| | | } |
| | | this.stationForm = res.data; |
| | | this.getdmp(this.lastLevelId,this.stationForm.machineId); |
| | | //this.newDate(); //获取当前日期 |
| | |
| | | } |
| | | }, |
| | | getdmp(lastLevelId,machineId) { |
| | | this.$HTTP.get(`/api/blade-cps/workstation/listDatapointsByWorkstationId?machineId=${machineId}&workstationId=${lastLevelId}`).then(res=> { |
| | | this.$HTTP.get(`/api/smis/workstation/listDatapointsByWorkstationId?machineId=${machineId}&workstationId=${lastLevelId}`).then(res=> { |
| | | if(res.code == 200) { |
| | | this.dmpList = []; |
| | | var that = this; |
| | |
| | | item.color = item1.color; |
| | | } |
| | | }) |
| | | item.description = item.dpLabel; |
| | | }else { |
| | | if(item.dpName == 'Alarm') { //报警 |
| | | if(eventData.data[item.dpName]) { |
| | |
| | | if(v.length == 0) { |
| | | JSONData.splice(index,1); |
| | | }else { |
| | | item.description = v[0].code; |
| | | item.codeName = v[0].msg; |
| | | } |
| | | }else { |
| | | item.description = v.code; |
| | | item.codeName = v.msg; |
| | | } |
| | | } |
| | | }else { |
| | | if(eventData.data[item.dpName]) { |
| | | item.description = item.dpLabel; |
| | | item.codeName = eventData.data[item.dpName].v; |
| | | }else { |
| | | item.codeName = ""; |
| | | } |
| | | } |
| | | that.allwcs.forEach((item1)=> { |
| | | if(item.code == item1.code) { |
| | | item.color = item1.color; |
| | | } |
| | | }else { |
| | | item.color = "#7FC0C0"; |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | |
| | | groupCategory: 1, |
| | | groupType: "group_workstation" |
| | | } |
| | | this.$HTTP.post("/api/blade-cps/group/groupWorkstation/type",obj).then(res=> { |
| | | this.$HTTP.post("/api/smis/group/groupWorkstation/type",obj).then(res=> { |
| | | if(res.code == 200) { |
| | | if (res.code == 200) { |
| | | var treeDisabled = this.addTreeDisable(res.data); |
| | |
| | | }) |
| | | }, |
| | | getachievements() { //班次状态记录采集状态 |
| | | this.$HTTP.get(`/api/blade-cps/global_wcs/wcs-achievements`).then(res=> { |
| | | this.$HTTP.get(`/api/smis/global_wcs/wcs-achievements`).then(res=> { |
| | | if(res.code == 200) { |
| | | var achievements = [];//采集状态 |
| | | var collectionstatus = []; //人工反馈状态 |
| | |
| | | }) |
| | | }, |
| | | getlist() { |
| | | this.$HTTP.get(`/api/blade-cps/workstation/get?workstationId=${this.lastLevelId}`).then(res=> { |
| | | if(res.code == 200) { |
| | | this.$HTTP.get(`/api/smis/workstation/get?workstationId=${this.lastLevelId}`).then(res=> { |
| | | if(res.code == 200) { |
| | | if(res.data.avatar == "") { |
| | | res.data.avatar = station; |
| | | } |
| | | this.stationForm = res.data; |
| | | this.getdmp(this.lastLevelId,this.stationForm.machineId); |
| | | } |