1
李喆(开发组)
2025-03-18 c978996d3e0390c0050479be4684af895cfb72cd
1
已修改1个文件
110 ■■■■ 文件已修改
src/views/home/widgets/components/mdcRunning.vue 110 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/home/widgets/components/mdcRunning.vue
@@ -2,7 +2,7 @@
 * @Author: lzhe lzhe@example.com
 * @Date: 2024-04-16 15:22:46
 * @LastEditors: 李喆(开发组) lzhe@yxqiche.com
 * @LastEditTime: 2025-03-11 10:08:05
 * @LastEditTime: 2025-03-14 15:07:08
 * @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
-->
@@ -29,14 +29,14 @@
                            default-expand-all
                            size="small"
                            @change = "parentIdChange"
                            v-model="search.workStationIdList"
                            clearable
                            v-model="search.workStationIdList"
                            clearable
                            node-key="id"
                            placeholder="上级菜单"
                            placeholder="上级菜单"
                            ref="parentTree"
                            :data="parentData"
                            :props="{ label: 'title' }"
                            style="width:80%;"
                            :data="parentData"
                            :props="{ label: 'title' }"
                            style="width:80%;"
                            :default-checked-keys="selectedIds"
                            :render-after-expand="false" />
                    </div>
@@ -69,7 +69,7 @@
    import * as ElementPlusIconsVue from '@element-plus/icons-vue'
    let icons = []
    for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
        icons.push(key)
        icons.push(key)
    }
    export default {
        title: "设备运行时长排名",
@@ -94,48 +94,48 @@
                    workStationIdList: []
                },
                cardData: {},
                option: {
                option: {
                    grid: {
                        top: '0',
                        bottom: '0',
                        containLabel: true
                    },
                    yAxis: {
                        type: 'category',
                        data: [],
                        axisLine: {
                            show: false // 隐藏y轴轴线
                        },
                        axisTick: {
                            show: false // 隐藏y轴刻度线
                    yAxis: {
                        type: 'category',
                        data: [],
                        axisLine: {
                            show: false // 隐藏y轴轴线
                        },
                        splitLine: {
                            show: false // 隐藏y轴网格线
                        axisTick: {
                            show: false // 隐藏y轴刻度线
                        },
                        splitLine: {
                            show: false // 隐藏y轴网格线
                        }
                    },
                    xAxis: {
                        type: 'value',
                        axisLabel: {
                        show: false // 隐藏x轴数据标签
                        }
                    },
                    series: [
                        {
                        data: [],
                        type: 'bar',
                        label: {
                            show: true, // 显示标签
                            position: 'right', // 标签位置设置为柱子的右侧
                            formatter: function(params) {
                            // 返回数据值和您想要添加的字符串的组合
                            return params.value + 'h'; // 例如,返回 '3.96 文字'
                            }
                    },
                    xAxis: {
                        type: 'value',
                        axisLabel: {
                        show: false // 隐藏x轴数据标签
                        }
                    },
                    series: [
                        {
                        data: [],
                        type: 'bar',
                        label: {
                            show: true, // 显示标签
                            position: 'right', // 标签位置设置为柱子的右侧
                            formatter: function(params) {
                            // 返回数据值和您想要添加的字符串的组合
                            return params.value + 'h'; // 例如,返回 '3.96 文字'
                            }
                        },
                        itemStyle: {
                            color: '#5CBF7D'
                        }
                        }
                    ]
                        }
                    ]
                    },
            }
        },
@@ -191,20 +191,18 @@
                return newData
            },
            extractLastLevelIds(items, result = []) {  //递归获取children最后一级的id的数组
              items.forEach(item => {
                // 如果当前项有id属性且没有children或children为空数组
                if (item.id && (!item.children || item.children.length === 0)) {
                  result.push(item.id);
                }
                // 如果当前项有children属性且是数组,则递归调用collectIds
                if (Array.isArray(item.children)) {
                  this.extractLastLevelIds(item.children, result);
                }
              });
              // 返回收集到的id数组
              return result;
                items.forEach(item => {
                    // 如果当前项有id属性且没有children或children为空数组
                    if (item.id && (!item.children || item.children.length === 0)) {
                        result.push(item.id);
                    }
                    // 如果当前项有children属性且是数组,则递归调用collectIds
                    if (Array.isArray(item.children)) {
                        this.extractLastLevelIds(item.children, result);
                    }
                });
                // 返回收集到的id数组
                return result;
            },
            getParentData() {
                this.$HTTP.post('/api/smis/group/groupWorkstation/type', {
@@ -258,9 +256,7 @@
                    }
                })
            },
            goPage(item) {
            }
            goPage(item) {}
        }
    }
</script>
@@ -283,7 +279,7 @@
    }
    .no-list {
        display: flex;
        justify-content: center;
        justify-content: center;
        font-weight: 500;
        font-size: 14px;
        color: #666;