gaosp
2024-01-16 4311550ada3b393c212727ab3c73f1e2994efbd2
update
已修改2个文件
27 ■■■■■ 文件已修改
src/container/Map/Map.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mixins/index.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/container/Map/Map.vue
@@ -38,7 +38,7 @@
                                :rowspan="v.rowspan" :colspan="v.colspan" :key="v.rowIndex + '-' + v.colIndex">
                                <img @click="addDevice($event,v)" @mousedown="e => e.stopPropagation()" v-if="v.type ===2 && status!==2 && !v.id" src="./img/+.png" alt="添加机床" title="添加机床">
                                <Device v-if="v.id" :id="v.id" style="width: 100%;height: 100%;" :deviceList="deviceList"
:plantDeviceList="plantDeviceList"></Device>
:plantDeviceList="plantDeviceList" ::info="info"></Device>
                            </td>
                        </tr>
                    </table>
src/mixins/index.js
@@ -1,7 +1,7 @@
/*
 * @Date: 2024-01-07 22:18:41
 * @LastEditors: Sneed
 * @LastEditTime: 2024-01-16 01:02:46
 * @LastEditTime: 2024-01-16 01:10:15
 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/mixins/index.js
 */
import { getUseDpts, getRequest } from '@/api/Api'
@@ -11,6 +11,18 @@
            deviceList: [], //待选设备
            deviceId: [],
            plantDeviceList: [],
            info: {
                runRate: '',
                cutRate: '',
                alarmRate: '',
                threeShiftRate: '',
                twoShiftRate: '',
                run: '',
                alarm: '',
                stop: '',
                idle: '',
            },
        }
    },
    watch: {
@@ -25,6 +37,17 @@
                                machineName: item.machineName
                            }
                        }) || []
                        this.info = {
                            runRate: res.data.runRate,
                            cutRate: res.data.cutRate,
                            alarmRate: res.data.alarmRate,
                            threeShiftRate: res.data.threeShiftRate,
                            twoShiftRate: res.data.twoShiftRate,
                            run: res.data.run,
                            alarm: res.data.alarm,
                            stop: res.data.stop,
                            idle: res.data.idle
                        }
                    })
                }
            }