1
lzhe
2024-06-24 c45cd9877daf5b4f51359e6dad7b71ff9a5069b6
src/views/home/widgets/components/mdcRunning.vue
@@ -2,14 +2,14 @@
 * @Author: lzhe lzhe@example.com
 * @Date: 2024-04-16 15:22:46
 * @LastEditors: lzhe lzhe@example.com
 * @LastEditTime: 2024-06-21 09:50:32
 * @LastEditTime: 2024-06-21 10:53:10
 * @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
-->
<template>
   <el-card shadow="hover" header="设备运行时长排名" style="height: 100%;" class="running">
      <div class="running-icon">
         <el-icon><RefreshLeft /></el-icon>
         <el-icon @click="refreshBtn"><RefreshLeft /></el-icon>
         <el-icon @click="showSearch"><Filter /></el-icon>
      </div>
      <div class="no-list">设备运行时长{{timeLevel}}小时内前{{top}}名</div>
@@ -37,6 +37,7 @@
                      :data="parentData"
                      :props="{ label: 'title' }"
                      style="width:80%;"
                     :default-checked-keys="selectedIds"
                     :render-after-expand="false" />
               </div>
               <div>
@@ -76,6 +77,7 @@
      description: "快速查看设备运行时长排名",
      data() {
         return {
            selectedIds: [],
            parentData: {},
            list: [],
            timeLevelList: [],
@@ -145,6 +147,9 @@
         }
      },
      methods: {
         refreshBtn() {
            this.getList();
         },
         showSearch() {
            this.search.timeLevel = this.timeLevel;
            this.search.top = this.top;
@@ -208,6 +213,8 @@
               if(item.cardKey == "mdcRunning") {
                  if(item.apiResource == "") return;
                  this.apiResource = JSON.parse(item.apiResource);
                  this.selectedIds = this.apiResource.workStationIdList;
                  this.search.workStationIdList = this.apiResource.workStationIdList;
                  this.timeLevel = this.apiResource.timeLevel;
                  this.top = this.apiResource.top;
                  if(this.apiResource.workStationIdList.length > 0) {