1
lzhe
2024-06-21 3763aa5edca021bcdb0f7036031488fa4c1f6c58
1
已修改1个文件
27 ■■■■ 文件已修改
src/views/home/widgets/components/mdcEquipmentRun.vue 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/home/widgets/components/mdcEquipmentRun.vue
@@ -2,7 +2,7 @@
 * @Author: lzhe lzhe@example.com
 * @Date: 2024-04-16 15:22:46
 * @LastEditors: lzhe lzhe@example.com
 * @LastEditTime: 2024-06-21 09:55:24
 * @LastEditTime: 2024-06-21 10:24:23
 * @FilePath: /CPSnew/smart-web/src/views/home/widgets/components/mdcDeviceStatus.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
@@ -37,6 +37,7 @@
                            :data="parentData"
                            :props="{ label: 'title' }"
                            style="width:80%;"
                            :default-checked-keys="selectedIds"
                            :render-after-expand="false" />
                    </div>
                    <div>
@@ -80,6 +81,7 @@
                parentData: {},
                list: [],
                timeLevelList: [],
                selectedIds: [],
                topList: [],
                search: {
                    workStationIdList: [],
@@ -87,8 +89,8 @@
                    top: ""
                },
                isSearch: false,
                timeLevel: "",
                top: "",
                timeLevel: "24",
                top: "5",
                apiResource: {
                    workStationIdList: []
                },
@@ -155,7 +157,7 @@
            },
            serchSubmit() {
                this.apiResource = this.search;
                this.getRunData();
                this.getRunData('search');
            },
            setCurrentKey(v) {
                if (this.firstWorkKey) return
@@ -214,8 +216,14 @@
                    }
                })
            },
            getRunData() {
                var ids = this.extractLastLevelIds(this.parentData);
            getRunData(type) {
                if(type != "search") {
                    var ids = this.extractLastLevelIds(this.parentData);
                    this.selectedIds = ids;
                    this.search.workStationIdList = ids;
                }else {
                    var ids = this.search.workStationIdList;
                }
                var obj = {
                    timeLevel: 24,
                    top: 7,
@@ -223,12 +231,17 @@
                }
                this.$HTTP.post(`/api/blade-visual/status/oee-top`,obj).then(res=> {
                    if(res.code == 200) {
                        // if(res.data.categories.length == 0) {
                        //     return;
                        // }
                        this.isSearch = false;
                        var recordDom = document.getElementById('equipment');
                        if(res.data.categories.length == 0) return;
                        this.option.yAxis.data = res.data.categories;
                        console.log(this.option.yAxis.data,'this.option.yAxis.data')
                        this.option.series[0].data = res.data.series[0].data;
                        this.oeeTitle = res.data.series[0].name;
                        console.log(this.oeeTitle,'this.oeeTitle')
                        var myChart = echarts.init(recordDom);
                        myChart.setOption(this.option);
                    }