Jelajahi Sumber

feat(工单管理): 新增质检工单功能

liujt 3 bulan lalu
induk
melakukan
f507b607b4

+ 13 - 2
src/views/bpm/tickets/index.vue

@@ -32,12 +32,14 @@
   import maintenance from './maintenance';
   import delivery from './delivery';
   import repair from './repair';
+  import inspectionWork from './inspectionWork';
   export default {
     components: {
       patrolInspection,
       maintenance,
       delivery,
-      repair
+      repair,
+      inspectionWork
     },
     data() {
       return {
@@ -46,7 +48,8 @@
           { key: 'patrolInspection', name: '巡点检工单' },
           { key: 'maintenance', name: '保养工单' },
           // { key: 'delivery', name: '量具送检工单' },
-          { key: 'repair', name: '维修工单' }
+          { key: 'repair', name: '维修工单' },
+          // { key: 'inspectionWork', name: '质检工单' }
           // { key: 'repair', name: '计划性维修工单' },
           // { key: 'malfunction', name: '盘点工单' }
         ]
@@ -54,6 +57,7 @@
     },
     mounted() {
       // this.setCount();
+      console.log(this.$route.query);
       switch (this.$route.query.title) {
         case '巡点检工单':
           this.activeComp = 'patrolInspection';
@@ -67,6 +71,9 @@
         case '维修工单':
           this.activeComp = 'repair';
           break;
+        case '质检工单':
+          this.activeComp = 'inspectionWork';
+          break;
         default:
           break;
       }
@@ -85,6 +92,10 @@
                 return { ...item, count: data.quantityNum };
               case 'repair':
                 return { ...item, count: data.repairsNum };
+              case 'inspectionWork':
+                return { ...item, count: data.inspectionWork || 0 };
+              default:
+                return item;
             }
           });
         });

+ 74 - 0
src/views/bpm/tickets/inspectionWork/index.vue

@@ -0,0 +1,74 @@
+<template>
+  <div>
+    <div class="iframe_box"  ref="iframeBox">
+      <!--   src="http://aiot.zoomwin.com.cn:51001/page-main-data/product/oneProduct?isWt=true&businessId=1895440590572208130" -->
+      <!-- {{ location + '/page-main-data/product/oneProduct?isWt=true&businessId=' + businessId }} -->
+   
+     <!-- <iframe
+     :src="'http://localhost:8087/qms/inspectionWork?isWt=true&isBtn=false&businessId=' + businessId" 
+      width="100%"
+      height="600"
+      frameborder="0"
+      allowfullscreen
+    ></iframe>  -->
+    </div>
+
+   
+  </div>
+</template>
+
+<script>
+
+  export default {
+    components: {
+
+    },
+    props: {
+      businessId: {
+        default: ''
+      }
+    },
+    mixins: [],
+
+    data() {
+      return {
+        visible: false,
+        title: '',
+
+        location: window.location.origin,
+  
+      };
+    },
+    created() {},
+    mounted() {
+    // 在组件挂载后显示加载提示
+    this.loading = this.$loading({
+      lock: true,
+      text: 'Loading',
+      spinner: 'el-icon-loading',
+      background: '#fff',
+      target: this.$refs.iframeBox // 将加载提示绑定到iframeBox上
+    });
+
+    // 模拟异步数据加载
+    setTimeout(() => {
+      // 数据加载完成后关闭加载提示
+      this.loading.close();
+    }, 4000); // 假设数据加载需要3秒
+  },
+    methods: {}
+  };
+</script>
+
+<style lang="scss" scoped>
+  :deep(.el-table__expanded-cell) {
+    padding-bottom: 30px !important;
+    border-bottom: 12px solid #ccffcc !important;
+  }
+
+  .iframe_box{
+    height: 600px;
+    width: 100%;
+   
+  }
+</style>