From 20f77a55f8eeaceb026d1c5ad96de75d6edb712a Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期四, 29 五月 2025 14:18:14 +0800
Subject: [PATCH] 1、报警分析页面报警页面调整比例饼图颜色 2、维修看板页面设备平均故障率柱状图Y轴去除%号以及去除柱子注释含义 3、设备管理页面新增弹窗添加禁止手输设备编号,新增安装位置字段(同时将MDC模块内所有设备名称显示调整为安装位置) 4、设备级看板页面的设备选择框新增安装位置显示 5、首页添加法士特沃克背景图 6、对比分析页面解决时间段查询选择框无法选择问题以及柱状图组件重置按钮关联设备树选择 7、OEE页面列表取消展示合格零件数量和加工零件数量字段,仅展示合格率字段

---
 src/views/eam/equipment/modules/ResumeDrawer.vue |  188 ++++++++++++++++++++++++++--------------------
 1 files changed, 107 insertions(+), 81 deletions(-)

diff --git a/src/views/eam/equipment/modules/ResumeDrawer.vue b/src/views/eam/equipment/modules/ResumeDrawer.vue
index 4178982..7d3547a 100644
--- a/src/views/eam/equipment/modules/ResumeDrawer.vue
+++ b/src/views/eam/equipment/modules/ResumeDrawer.vue
@@ -1,98 +1,124 @@
 <template>
-  <a-drawer title="璁惧灞ュ巻" placement="right" :width="500" :closable="false" :visible="visible" @close="onClose">
-    <a-timeline mode="alternate">
-      <a-timeline-item>Create a services site 2015-09-01</a-timeline-item>
-      <a-timeline-item color="green">
-        Solve initial network problems 2015-09-01
-      </a-timeline-item>
-      <a-timeline-item>
-        <a-icon slot="dot" type="clock-circle-o" style="font-size: 16px;"/>
-        Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque
-        laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto
-        beatae vitae dicta sunt explicabo.
-      </a-timeline-item>
-      <a-timeline-item color="red">
-        Network problems being solved 2015-09-01
-      </a-timeline-item>
-      <a-timeline-item>Create a services site 2015-09-01</a-timeline-item>
-      <a-timeline-item>
-        <a-icon slot="dot" type="clock-circle-o" style="font-size: 16px;"/>
-        Technical testing 2015-09-01
-      </a-timeline-item>
-      <a-timeline-item>Create a services site 2015-09-01</a-timeline-item>
-      <a-timeline-item color="green">
-        Solve initial network problems 2015-09-01
-      </a-timeline-item>
-      <a-timeline-item>
-        <a-icon slot="dot" type="clock-circle-o" style="font-size: 16px;"/>
-        Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque
-        laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto
-        beatae vitae dicta sunt explicabo.
-      </a-timeline-item>
-      <a-timeline-item color="red">
-        Network problems being solved 2015-09-01
-      </a-timeline-item>
-      <a-timeline-item>Create a services site 2015-09-01</a-timeline-item>
-      <a-timeline-item>
-        <a-icon slot="dot" type="clock-circle-o" style="font-size: 16px;"/>
-        Technical testing 2015-09-01
-      </a-timeline-item>
-      <a-timeline-item>Create a services site 2015-09-01</a-timeline-item>
-      <a-timeline-item color="green">
-        Solve initial network problems 2015-09-01
-      </a-timeline-item>
-      <a-timeline-item>
-        <a-icon slot="dot" type="clock-circle-o" style="font-size: 16px;"/>
-        Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque
-        laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto
-        beatae vitae dicta sunt explicabo.
-      </a-timeline-item>
-      <a-timeline-item color="red">
-        Network problems being solved 2015-09-01
-      </a-timeline-item>
-      <a-timeline-item>Create a services site 2015-09-01</a-timeline-item>
-      <a-timeline-item>
-        <a-icon slot="dot" type="clock-circle-o" style="font-size: 16px;"/>
-        Technical testing 2015-09-01
-      </a-timeline-item>
-    </a-timeline>
+  <a-drawer :title="title" placement="right" :width="600" :closable="false" :visible="visible" @close="onClose">
+    <a-spin :spinning="spinning">
+      <a-skeleton :title="false" :paragraph="{ rows: 30}" v-if="spinning&&dataSource.length===0"/>
+
+      <template v-if="dataSource.length>0">
+        <a-timeline mode="alternate">
+          <a-timeline-item v-for="item in dataSource" :key="item.id">
+            <span>鎿嶄綔浜猴細{{item.operator_dictText}}</span><br/>
+            <span>鎿嶄綔锛歿{item.operationTag_dictText}}</span><br/>
+            <!--<span>鎻忚堪锛歿{item.description}}</span>-->
+            <span>鎿嶄綔鏃堕棿锛歿{item.createTime}}</span>
+          </a-timeline-item>
+        </a-timeline>
+
+        <div style="text-align: center">
+          <a v-if="dataSource.length>0&&pageConfig.pageNo===1&&pageConfig.pageNo!==pageConfig.totalPage"
+             @click="loadNextPageData">
+            鐐瑰嚮鍔犺浇鏇村
+            <a-icon type="down"/>
+          </a>
+
+          <span v-if="isNoMoreData">- 宸茬粡鍒板簳浜� -</span>
+
+          <a-empty v-if="dataSource.length===0"/>
+        </div>
+      </template>
+    </a-spin>
   </a-drawer>
 </template>
 
 <script>
-export default {
-  name: 'ResumeDrawer',
-  data() {
-    return {
-      visible: false
-    }
-  },
-  methods: {
-    getEquipmentResumeByApi() {
+  import { getAction } from '@/api/manage'
 
+  export default {
+    name: 'ResumeDrawer',
+    props: {
+      currentTableRowRecord: {
+        type: Object
+      }
     },
+    data() {
+      return {
+        title: '璁惧灞ュ巻',
+        visible: false,
+        spinning: false,
+        dataSource: [],
+        url: {
+          list: '/eam/equipmentHistoryLog/list'
+        },
+        pageConfig: {
+          pageNo: 1,
+          pageSize: 10,
+          totalPage: 0
+        },
+        drawerBodyElement: null,
+        isNoMoreData: false
+      }
+    },
+    methods: {
+      getEquipmentResumeByApi(pageNo = 1) {
+        this.pageConfig.pageNo = pageNo
+        const params = Object.assign({}, this.pageConfig, { equipmentId: this.currentTableRowRecord.id })
+        const that = this
+        this.spinning = true
+        getAction(this.url.list, params)
+          .then(res => {
+            if (res.success) {
+              console.log('res.result', res.result)
+              if (!this.pageConfig.totalPage) this.pageConfig.totalPage = res.result.pages
+              res.result.records.forEach(item => that.dataSource.push(item))
+              if (this.pageConfig.totalPage !== this.pageConfig.pageNo) {
+                if (res.result.current === 2) {
+                  if (!this.drawerBodyElement) this.drawerBodyElement = document.querySelector('.ant-drawer-body')
+                  this.drawerBodyElement.addEventListener('scroll', this.handleDrawerBodyScroll)
+                }
+              } else this.isNoMoreData = true
+            }
+          })
+          .finally(() => {
+            that.spinning = false
+          })
+      },
 
-    onClose() {
-      this.visible = false
+      // 鍔犺浇涓嬩竴椤垫暟鎹�
+      loadNextPageData() {
+        const current = this.pageConfig.pageNo + 1
+        this.getEquipmentResumeByApi(current)
+      },
+
+      // 鎶藉眽鍏冪礌婊氬姩浜嬩欢
+      handleDrawerBodyScroll() {
+        if (this.pageConfig.totalPage === this.pageConfig.pageNo) return
+        const { scrollTop, clientHeight, scrollHeight } = this.drawerBodyElement
+        if (scrollTop + clientHeight + 1 >= scrollHeight) this.loadNextPageData()
+      },
+
+      onClose() {
+        this.visible = false
+        this.pageConfig.totalPage = 0
+        this.isNoMoreData = false
+        if (this.drawerBodyElement) this.drawerBodyElement.removeEventListener('scroll', this.handleDrawerBodyScroll)
+      }
     }
   }
-}
 </script>
 
 <style scoped lang="less">
-/deep/ .ant-drawer-wrapper-body {
-  overflow: hidden;
-  display: flex;
-  flex-direction: column;
+  /deep/ .ant-drawer-wrapper-body {
+    overflow: hidden;
+    display: flex;
+    flex-direction: column;
 
-  ::-webkit-scrollbar {
-    width: 8px;
-    height: 8px;
-  }
+    ::-webkit-scrollbar {
+      width: 8px;
+      height: 8px;
+    }
 
-  .ant-drawer-body {
-    flex: 1;
-    overflow: auto;
+    .ant-drawer-body {
+      flex: 1;
+      overflow: auto;
+    }
   }
-}
 </style>
\ No newline at end of file

--
Gitblit v1.9.3