From 445cfc2c5cee3d8fc0f8f1ffae5b66d9c761e681 Mon Sep 17 00:00:00 2001
From: qushaowei <qushaowei@163.com>
Date: 星期三, 22 十一月 2023 19:15:39 +0800
Subject: [PATCH] Merge branch 'develop'

---
 src/views/eam/RepairOrderList.vue |  225 +++++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 148 insertions(+), 77 deletions(-)

diff --git a/src/views/eam/RepairOrderList.vue b/src/views/eam/RepairOrderList.vue
index 764d7a9..e606ddc 100644
--- a/src/views/eam/RepairOrderList.vue
+++ b/src/views/eam/RepairOrderList.vue
@@ -1,6 +1,6 @@
 <template>
   <a-card
-    title="缁翠慨宸ュ崟"
+    title="缁翠慨"
     :bordered="false"
   >
     <div class="table-page-search-wrapper">
@@ -8,6 +8,22 @@
         layout="inline"
         @keyup.enter.native="searchQuery"
       >
+      <a-row :gutter="24" style="margin-bottom: 1%;">
+          <a-col
+            :xl="24"
+            :lg="7"
+            :md="8"
+            :sm="24"
+          >
+          <a-form-item label="缁熶竴缂栧彿缇�">
+              <a-textarea
+                placeholder="璇疯緭鍏ユ墍鏈夌粺涓�缂栫爜,椤荤敤鈥�,鈥濋殧寮�,鍚﹀垯鍙兘鏌ヨ鍑洪敊璇俊鎭�"
+                v-model="queryParam.nums"
+                :auto-size="{ minRows: 2, maxRows:2 }"
+              ></a-textarea>
+            </a-form-item>
+          </a-col>
+        </a-row>
         <a-row :gutter="24">
           <a-col
             :xl="6"
@@ -20,7 +36,7 @@
                 allow-clear
                 placeholder="璇烽�夋嫨宸ュ崟鐘舵��"
                 :triggerChange="true"
-                dictCode="repair_order_status"
+                dictCode="true_repair_status"
                 v-model="queryParam.status"
               />
             </a-form-item>
@@ -44,14 +60,14 @@
             :md="8"
             :sm="24"
           >
-            <a-form-item label="璁惧缂栫爜">
+            <a-form-item label="缁熶竴缂栫爜">
               <a-input
-                placeholder="璇疯緭鍏ヨ澶囩紪鐮�"
+                placeholder="璇疯緭鍏ョ粺涓�缂栫爜"
                 v-model="queryParam.equipmentNum"
               ></a-input>
             </a-form-item>
           </a-col>
-          <a-col :span="3">
+          <!-- <a-col :span="3">
             <span
               style="float: left;overflow: hidden;"
               class="table-page-search-submitButtons"
@@ -64,12 +80,8 @@
                 <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
               </a>
             </span>
-          </a-col>
-        </a-row>
-
-        <template v-if="toggleSearchStatus">
-          <a-row :gutter="24">
-            <a-col
+          </a-col> -->
+          <a-col
               :xl="6"
               :lg="7"
               :md="8"
@@ -82,6 +94,8 @@
                 ></a-input>
               </a-form-item>
             </a-col>
+        </a-row>
+          <a-row :gutter="24">
             <a-col 
             :xl="6"
               :lg="7"
@@ -110,7 +124,7 @@
                 allow-clear
                 placeholder="璇烽�夋嫨璧勫伐鍖�"
                 :triggerChange="true"
-                dictCode="mom_base_factory_model,name,id,del_flag!='1'"
+                dictCode="mom_base_area,name,id,del_flag!='1'"
                 v-model="queryParam.factoryModelId"
               />
             </a-form-item>
@@ -130,6 +144,22 @@
                 :triggerChange="true"
                 dictCode="specific_equipment"
                 v-model="queryParam.specificEquipment"
+              />
+            </a-form-item>
+          </a-col>
+          <a-col
+            :xl="6"
+            :lg="7"
+            :md="8"
+            :sm="24"
+          >
+            <a-form-item label="缁翠慨鐘舵��">
+              <j-dict-select-tag
+                allow-clear
+                placeholder="璇烽�夋嫨缁翠慨鐘舵��"
+                :triggerChange="true"
+                dictCode="repair_status"
+                v-model="queryParam.repairOrderUda1"
               />
             </a-form-item>
           </a-col>
@@ -153,7 +183,6 @@
             </a-form-item>
           </a-col>
           </a-row> -->
-        </template>
       </a-form>
     </div>
     <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
@@ -235,10 +264,18 @@
         :loading="loading"
         @change="handleTableChange"
         :customRow="clickThenSelect"
+        :rowClassName="tableRowClass"
       >
         <span slot="jell" slot-scope="text">
             <j-ellipsis :value="text" :length="8" />
         </span>
+        <span
+          slot="specificEquipment"
+          slot-scope="text"
+        >
+        <a-icon type="check" style="color: chartreuse;" v-if="text==='0'" />
+        <a-icon type="close" v-else style="color:red;"/>
+      </span>
         <span
           slot="num"
           slot-scope="text, record"
@@ -422,6 +459,7 @@
     </repair-order-excute-drawer>
     <fault-report-repair
       ref="FaultReportRepair"
+      @ok="modalFormOk"
     ></fault-report-repair>
   </a-card>
 </template>
@@ -444,16 +482,7 @@
 import FaultDescriptionList from './FaultDescriptionList'
 import FaultReportRepair from './modules/repairorder/moudles/select/FaultReportRepair.vue'
 import store from '@/store'
-import {
-  ACCESS_TOKEN,
-  USER_NAME,
-  USER_INFO,
-  USER_AUTH,
-  SYS_BUTTON_AUTH,
-  UI_CACHE_DB_DICT_DATA,
-  TENANT_ID,
-  CACHE_INCLUDED_ROUTES
-} from '@/store/mutation-types'
+import dayjs from 'dayjs'
 export default {
   name: "RepairOrderList",
   mixins: [JeecgListMixin],
@@ -473,6 +502,11 @@
     FaultReportRepair,
     store
   },
+  mounted(){
+    let intervalId = setInterval(() => {
+        this.loadData();
+    }, 600*1000); // 1000姣锛屽嵆1绉�
+  },
   data() {
     return {
       description: '缁翠慨宸ュ崟绠$悊椤甸潰',
@@ -489,9 +523,23 @@
           }
         },
         {
+          title: '鍏抽敭璁惧?',
+          align: "center",
+          dataIndex: 'specificEquipment',
+          scopedSlots: { customRender: 'specificEquipment' }
+        },
+        {
           title: '鐘舵��',
           align: "center",
           dataIndex: 'status_dictText'
+        },
+        {
+          title: '缁翠慨鐘舵��',
+          align: "center",
+          dataIndex: 'repairOrderUda1_dictText',
+          customRender:function (t,r,index) {
+              return t===null||r.repairOrderUda1===null?'/':t;
+          }
         },
         {
           title: '鍗曟嵁鍙�',
@@ -505,7 +553,7 @@
         //   dataIndex: 'businessType_dictText'
         // },
         {
-          title: '璁惧缂栫爜',
+          title: '缁熶竴缂栫爜',
           align: "center",
           dataIndex: 'equipmentNum'
         },
@@ -552,16 +600,26 @@
           align: "center",
           dataIndex: 'responsibilityId_dictText'
         },
-        {
-          title: '娲惧伐鏂瑰紡',
-          align: "center",
-          dataIndex: 'dispatchMethod_dictText'
-        },
+        // {
+        //   title: '娲惧伐鏂瑰紡',
+        //   align: "center",
+        //   dataIndex: 'dispatchMethod_dictText'
+        // },
         // {
         //   title: '鐗圭璁惧',
         //   align: "center",
         //   dataIndex: 'specificEquipment_dictText'
         // },
+        {
+          title: '鏁呴殰鏃堕棿',
+          align: "center",
+          dataIndex: 'faultTime'
+        },
+        {
+          title: '鎶ヤ慨浜�',
+          align: "center",
+          dataIndex: 'errUda2'
+        },
         {
           title: '鏁呴殰鎻忚堪',
           align: "center",
@@ -570,30 +628,25 @@
             customRender: 'jell' 
           }
         },
-        {
-          title: '鏁呴殰鍘熷洜',
-          align: "center",
-          dataIndex: 'faultReason'
-        },
-        {
-          title: '鏁呴殰鐜拌薄',
-          align: "center",
-          dataIndex: 'faultPhenomenon'
-        },
-        {
-          title: '鏁呴殰鎺掗櫎',
-          align: "center",
-          dataIndex: 'faultRemove'
-        },
-        {
-          title: '棰勯槻鎺柦',
-          align: "center",
-          dataIndex: 'preventiveMeasure'
-        },
         // {
-        //   title: '鏁呴殰鏃堕棿',
+        //   title: '鏁呴殰鍘熷洜',
         //   align: "center",
-        //   dataIndex: 'faultTime'
+        //   dataIndex: 'faultReason'
+        // },
+        // {
+        //   title: '鏁呴殰鐜拌薄',
+        //   align: "center",
+        //   dataIndex: 'faultPhenomenon'
+        // },
+        // {
+        //   title: '鏁呴殰鎺掗櫎',
+        //   align: "center",
+        //   dataIndex: 'faultRemove'
+        // },
+        // {
+        //   title: '棰勯槻鎺柦',
+        //   align: "center",
+        //   dataIndex: 'preventiveMeasure'
         // },
         // {
         //   title: '鏁呴殰鐓х墖',
@@ -611,31 +664,31 @@
         //   align: "center",
         //   dataIndex: 'workingHourQuota'
         // },
-        {
-          title: '瀹為檯宸ユ椂',
-          align: "center",
-          dataIndex: 'actualHour'
-        },
-        {
-          title: '璁″垝寮�濮嬫椂闂�',
-          align: "center",
-          dataIndex: 'planStartTime'
-        },
-        {
-          title: '璁″垝缁撴潫鏃堕棿',
-          align: "center",
-          dataIndex: 'planEndTime'
-        },
-        {
-          title: '瀹為檯寮�濮嬫椂闂�',
-          align: "center",
-          dataIndex: 'actualStartTime'
-        },
-        {
-          title: '瀹為檯缁撴潫鏃堕棿',
-          align: "center",
-          dataIndex: 'actualEndTime'
-        },
+        // {
+        //   title: '瀹為檯宸ユ椂',
+        //   align: "center",
+        //   dataIndex: 'actualHour'
+        // },
+        // {
+        //   title: '璁″垝寮�濮嬫椂闂�',
+        //   align: "center",
+        //   dataIndex: 'planStartTime'
+        // },
+        // {
+        //   title: '璁″垝缁撴潫鏃堕棿',
+        //   align: "center",
+        //   dataIndex: 'planEndTime'
+        // },
+        // {
+        //   title: '瀹為檯寮�濮嬫椂闂�',
+        //   align: "center",
+        //   dataIndex: 'actualStartTime'
+        // },
+        // {
+        //   title: '瀹為檯缁撴潫鏃堕棿',
+        //   align: "center",
+        //   dataIndex: 'actualEndTime'
+        // },
         {
           title: '鍒涘缓浜�',
           align: "center",
@@ -889,12 +942,30 @@
     },
     getReports(){
          this.$refs.FaultReportRepair.title = '鏁呴殰鎶ヤ慨鍗�';
+         this.$refs.FaultReportRepair.loadData();
          this.$refs.FaultReportRepair.visible = true;
-    }
+    },
+    tableRowClass(record, index) {
+      if ("2" === record.status) {
+        if (record.specificEquipment==='0'&&dayjs(record.faultTime).add(12,'hour')<dayjs()) {
+          return 'error'
+        } else if(dayjs(record.faultTime).add(7,'day')<dayjs()){
+          return 'primary'
+        }
+      }
+    },
 
   },
 }
 </script>
 <style scoped>
 @import '~@assets/less/common.less';
+.error {
+  color: red;
+  font-weight: bold;
+}
+.primary {
+  color: rgb(255, 0, 251);
+  font-weight: bold;
+}
 </style>
\ No newline at end of file

--
Gitblit v1.9.3