| | |
| | | * @Author: lzhe lzhe@example.com |
| | | * @Date: 2024-04-26 09:36:18 |
| | | * @LastEditors: lzhe lzhe@example.com |
| | | * @LastEditTime: 2024-06-05 11:49:48 |
| | | * @LastEditTime: 2024-09-19 10:11:58 |
| | | * @FilePath: /smart-web/src/views/mdc/status-record.vue |
| | | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |
| | | --> |
| | |
| | | <div class="status-box" v-for="item in achievements"><div class="status-color" :style="{'background-color': item.color}"></div>{{ item.name }}</div> |
| | | </div> |
| | | <div class="status-wrap"> |
| | | <el-checkbox v-model="checked1" label="人工反馈状态" size="large" /> |
| | | <el-checkbox v-model="humanFeedback" label="人工反馈状态" size="large" @change="humanFeedbackChange" /> |
| | | <div class="status-con"> |
| | | <div class="status-box" v-for="item in collectionstatus"><div class="status-color" :style="{'background-color': item.color}"></div>{{ item.name }}</div> |
| | | </div> |
| | |
| | | <!-- collectionstatus 反馈状态 |
| | | date 日期 |
| | | workstationInfoList 工位list --> |
| | | <record-charts-by-date :achievements="allwcs" :date="date" :workstationInfoList="workstationInfoList" v-if="date != ''" ref="chart01"></record-charts-by-date> |
| | | <record-charts-by-date :achievements="allwcs" :date="date" :workstationInfoList="workstationInfoList" v-if="date != ''" ref="chart01" :humanFeedback="humanFeedback"></record-charts-by-date> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="按工位查看" name="time"> |
| | | <div class="fact-analysis-realtim"> |
| | |
| | | <div class="status-box" v-for="item in achievements"><div class="status-color" :style="{'background-color': item.color}"></div>{{ item.name }}</div> |
| | | </div> |
| | | <div class="status-wrap"> |
| | | <el-checkbox v-model="checked1" label="人工反馈状态" size="large" /> |
| | | <el-checkbox v-model="humanFeedback" label="人工反馈状态" size="large" /> |
| | | <div class="status-con"> |
| | | <div class="status-box" v-for="item in collectionstatus"><div class="status-color" :style="{'background-color': item.color}"></div>{{ item.name }}</div> |
| | | </div> |
| | |
| | | select: [], |
| | | workstationInfoList: [], |
| | | date: "", |
| | | checked1: true, |
| | | humanFeedback: true, |
| | | btnListActive: '', |
| | | btnGongweiListActive: "", |
| | | btnList: [], |
| | |
| | | this.init(); |
| | | }, |
| | | methods: { |
| | | humanFeedbackChange(falg) { |
| | | this.$refs.chart01.getCharts(); |
| | | }, |
| | | addfeedbackSuccess() { |
| | | var workstationName = ""; |
| | | this.btnGongweiList.forEach(item=> { |
| | |
| | | this.setWork = { |
| | | endDate: this.time[1], |
| | | startDate: this.time[0], |
| | | humanFeedback: true, |
| | | humanFeedback: this.humanFeedback, |
| | | machineFeedback: true, |
| | | workstationId: this.lastLevelId, |
| | | workstationName: workstationName |
| | |
| | | this.setWork = { //工位 |
| | | endDate: this.time[1], |
| | | startDate: this.time[0], |
| | | humanFeedback: true, |
| | | humanFeedback: this.humanFeedback, |
| | | machineFeedback: true, |
| | | workstationId: this.select[0].id, |
| | | workstationName: this.btnGongweiList[0].name |
| | |
| | | startTime: this.time[0], |
| | | workstationInfoList: this.workstationInfoList |
| | | } |
| | | this.$HTTP.post(`/api/blade-mdc/status-record/excel/export`,obj).then(res=> { |
| | | this.$HTTP.post(`/api/mdc/status-record/excel/export`,obj).then(res=> { |
| | | if(res.code == 200) { |
| | | window.open(res.data.link); |
| | | } |
| | |
| | | this.setWork = { |
| | | endDate: this.time[1], |
| | | startDate: this.time[0], |
| | | humanFeedback: true, |
| | | humanFeedback: this.humanFeedback, |
| | | machineFeedback: true, |
| | | workstationId: item.id, |
| | | workstationName: workstationName |
| | |
| | | }) |
| | | }, |
| | | 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 = []; //人工反馈状态 |
| | |
| | | }, |
| | | getTime(data) { |
| | | return new Promise(resolve=> { |
| | | this.$HTTP.post('/api/blade-mdc/efficiency-analysis/interval', {...data}).then(res => { |
| | | this.$HTTP.post('/api/mdc/efficiency-analysis/interval', {...data}).then(res => { |
| | | if (res.code === 200) { |
| | | var today = moment().format('YYYY-MM-DD'); |
| | | var yesterday = moment().subtract(1, 'days').format('YYYY-MM-DD'); |
| | |
| | | this.workstationInfoList = this.select; |
| | | this.btnGongweiList = this.select; //工位 |
| | | this.date = this.btnList[0].id; |
| | | if(this.activeName == "shift") { |
| | | this.$nextTick(()=> { |
| | | this.$refs.chart01.getCharts(); |
| | | }) |
| | | }else { |
| | | if(this.btnGongweiList.length != 0) { //有选工位才能展示工位 |
| | | this.isshowempty = false; |
| | | console.log(this.btnGongweiList,122) |
| | | this.btnGongweiListActive = this.btnGongweiList[0].id; //工位 |
| | | this.lastLevelId = this.btnGongweiListActive; |
| | | this.setWork = { //工位 |
| | | endDate: this.time[1], |
| | | startDate: this.time[0], |
| | | humanFeedback: true, |
| | | machineFeedback: true, |
| | | workstationId: this.select[0].id, |
| | | workstationName: this.btnGongweiList[0].name |
| | | } |
| | | this.workSelect = this.select; |
| | | this.$nextTick(()=> { |
| | | this.$refs.chart02.getCharts(); |
| | | }) |
| | | this.$nextTick(()=> { //按日期查看 |
| | | this.$refs.chart01.getCharts(); |
| | | }) |
| | | //按工位查看 |
| | | if(this.btnGongweiList.length != 0) { //有选工位才能展示工位 |
| | | this.isshowempty = false; |
| | | this.btnGongweiListActive = this.btnGongweiList[0].id; //工位 |
| | | this.lastLevelId = this.btnGongweiListActive; |
| | | this.setWork = { //工位 |
| | | endDate: this.time[1], |
| | | startDate: this.time[0], |
| | | humanFeedback: this.humanFeedback, |
| | | machineFeedback: true, |
| | | workstationId: this.select[0].id, |
| | | workstationName: this.btnGongweiList[0].name |
| | | } |
| | | this.workSelect = this.select; |
| | | this.$nextTick(()=> { |
| | | this.$refs.chart02.getCharts(); |
| | | }) |
| | | } |
| | | }); |
| | | } |