From ddd7e6f6c57c2f39305e94a74650e28bbf31f9e7 Mon Sep 17 00:00:00 2001
From: “linengliang” <vanSuperEnergy@163.com>
Date: 星期二, 12 三月 2024 16:24:29 +0800
Subject: [PATCH] 问题项修改

---
 src/views/eam/MalfunctionRepair.vue |  163 ++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 122 insertions(+), 41 deletions(-)

diff --git a/src/views/eam/MalfunctionRepair.vue b/src/views/eam/MalfunctionRepair.vue
index 4358a35..d2077f6 100644
--- a/src/views/eam/MalfunctionRepair.vue
+++ b/src/views/eam/MalfunctionRepair.vue
@@ -8,14 +8,17 @@
       <a-form
         layout="inline"
         @keyup.enter.native="searchQuery"
-      > <a-row :gutter="24" style="margin-bottom: 1%;">
+      > <a-row
+          :gutter="24"
+          style="margin-bottom: 1%;"
+        >
           <a-col
             :md="24"
             :sm="6"
           >
-          <a-form-item label="缁熶竴缂栧彿缇�">
+            <a-form-item label="缁熶竴缂栧彿缇�">
               <a-textarea
-                placeholder="璇疯緭鍏ユ墍鏈夌粺涓�缂栫爜,椤荤敤鈥�,鈥濋殧寮�,鍚﹀垯鍙兘鏌ヨ鍑洪敊璇俊鎭�"
+                placeholder="璇疯緭鍏ユ墍鏈夌粺涓�缂栫爜,椤荤敤鎹㈣闅斿紑,鍚﹀垯鍙兘鏌ヨ鍑洪敊璇俊鎭�"
                 v-model="queryParam.nums"
                 :auto-size="{ minRows: 2, maxRows:2 }"
               ></a-textarea>
@@ -174,33 +177,53 @@
               ></a-input>
             </a-form-item>
           </a-col>
+          <a-col
+            :md="6"
+            :sm="6"
+          >
+            <a-form-item label="鏄惁鍏抽敭璁惧">
+              <j-dict-select-tag
+                allow-clear
+                placeholder="璇烽�夋嫨鏄惁鍏抽敭璁惧"
+                :triggerChange="true"
+                dictCode="specific_equipment"
+                v-model="queryParam.specificEquipment"
+              />
+            </a-form-item>
+          </a-col>
         </a-row>
       </a-form>
     </div>
     <div class="table-operator">
-              <a-button
-                type="primary"
-                @click="searchQuery"
-                icon="search"
-              >鏌ヨ</a-button>
-              <a-button
-                type="primary"
-                @click="searchReset"
-                icon="reload"
-                style="margin-left: 8px"
-              >閲嶇疆</a-button>
+      <a-button
+        type="primary"
+        @click="searchQuery"
+        icon="search"
+      >鏌ヨ</a-button>
+      <a-button
+        type="primary"
+        @click="searchReset"
+        icon="reload"
+        style="margin-left: 8px"
+      >閲嶇疆</a-button>
       <a-button
         @click="handleAdd"
         type="primary"
         icon="plus"
+        v-has="'report:add&edit'"
       >鏂板</a-button>
+      <a-button
+        type="primary"
+        icon="download"
+        @click="handleExportXls('鏁呴殰鎶ヤ慨')"
+      >瀵煎嚭</a-button>
     </div>
 
     <div>
       <a-table
         ref="table"
         size="middle"
-        :scroll="{ x: 'calc(1900px + 50%)', y: 900 }"
+        :scroll="{ x: 'calc(1500px + 50%)', y: 900 }"
         bordered
         rowKey="id"
         :columns="columns"
@@ -212,12 +235,28 @@
         :customRow="clickThenSelect"
       >
         <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="action"
           slot-scope="text, record"
         >
           <a
             :disabled=" record.status !== '4'"
             @click="handleAccept(record)"
+            v-has="'report:accept'"
           >楠屾敹</a>
           <!-- <a-popconfirm
             v-if="record.status == '1' || record.status == '4'"
@@ -277,8 +316,14 @@
             </a-menu>
           </a-dropdown> -->
         </span>
-        <span slot="jell" slot-scope="text">
-            <j-ellipsis :value="text" :length="10" />
+        <span
+          slot="jell"
+          slot-scope="text"
+        >
+          <j-ellipsis
+            :value="text"
+            :length="10"
+          />
         </span>
 
       </a-table>
@@ -296,7 +341,10 @@
           class="table-operator"
           style="margin-top: 0px"
         >
-          <FaultDescriptionList ref="FaultDescriptionList"   @ok="modalFormOk"/>
+          <FaultDescriptionList
+            ref="FaultDescriptionList"
+            @ok="modalFormOk"
+          />
         </div>
 
       </a-tab-pane>
@@ -312,8 +360,8 @@
       @cancel='approvalModalFormOk'
     ></approvel-modal>
     <accept-model
-    ref="acceptModel"
-    @ok="modalFormOk"
+      ref="acceptModel"
+      @ok="modalFormOk"
     ></accept-model>
   </a-card>
 </template>
@@ -343,8 +391,8 @@
   },
   data() {
     return {
-      treeData:[],
-      faultTime:[],
+      treeData: [],
+      faultTime: [],
       description: '鏁呴殰鎶ヤ慨',
       queryParam: { delflag: 0 },
       selectedRowKeys: [],
@@ -361,14 +409,46 @@
           }
         },
         {
+          title: '鍗曟嵁鍙�',
+          align: "center",
+          dataIndex: 'num'
+        },
+        {
           title: '鐘舵��',
           align: "center",
           dataIndex: 'statusName',
         },
         {
-          title: '鍗曟嵁鍙�',
+          title: '鎶ヤ慨绫诲瀷',
           align: "center",
-          dataIndex: 'num'
+          dataIndex: 'type',
+          customRender: (text) => {
+            if (text == '1') {
+              return "琚姩鎶ヤ慨";
+            } else if (text == '2') {
+              return "涓诲姩鎶ヤ慨";
+            } else if (text == '3') {
+              return "涓诲姩缁翠慨";
+            }
+          },
+        },
+        {
+          title: '鏉ユ簮',
+          align: "center",
+          dataIndex: 'source',
+          customRender: (text) => {
+            if (text == '1') {
+              return "鎵嬪姩鍒涘缓";
+            } else if (text == '2') {
+              return "鐐规鎶ヤ慨";
+            }
+          },
+        },
+        {
+          title: '鍏抽敭璁惧',
+          align: "center",
+          dataIndex: 'specificEquipment',
+          scopedSlots: { customRender: 'specificEquipment' }
         },
         {
           title: '缁熶竴缂栧彿',
@@ -385,11 +465,11 @@
           align: "center",
           dataIndex: 'equipmentModel',
         },
-        {
-          title: '瑙勬牸',
-          align: "center",
-          dataIndex: 'equipmentSpecification',
-        },
+        // {
+        //   title: '瑙勬牸',
+        //   align: "center",
+        //   dataIndex: 'equipmentSpecification',
+        // },
         {
           title: '浣跨敤閮ㄩ棬',
           align: "center",
@@ -404,8 +484,8 @@
           title: '鏁呴殰鎻忚堪',
           align: "center",
           dataIndex: 'faultDescription',
-          scopedSlots: { 
-            customRender: 'faultDescription' 
+          scopedSlots: {
+            customRender: 'faultDescription'
           }
 
         },
@@ -423,7 +503,8 @@
         {
           title: '鏁呴殰鏃堕棿',
           align: "center",
-          dataIndex: 'faultTime'
+          dataIndex: 'faultTime',
+          width: 200
         },
         {
           title: '鏄惁鍋滄満寰呬慨',
@@ -444,8 +525,8 @@
           title: '楠屾敹鎰忚',
           align: "center",
           dataIndex: 'errUda5',
-          scopedSlots: { 
-            customRender: 'jell' 
+          scopedSlots: {
+            customRender: 'jell'
           }
         },
         {
@@ -458,7 +539,7 @@
           dataIndex: 'action',
           align: "center",
           fixed: "right",
-          width: 200,
+          width: 100,
           scopedSlots: { customRender: 'action' }
         }
       ],
@@ -474,8 +555,8 @@
       /* 鍒嗛〉鍙傛暟 */
       ipagination: {
         current: 1,
-        pageSize: 5,
-        pageSizeOptions: ['5', '10', '50'],
+        pageSize: 20,
+        pageSizeOptions: ['5', '10', '20', '50'],
         showTotal: (total, range) => {
           return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�"
         },
@@ -486,7 +567,7 @@
     }
   },
   created() {
-       this.initOptions();
+    this.initOptions();
   },
   computed: {
     importExcelUrl: function () {
@@ -642,12 +723,12 @@
         }
       })
     },
-    timeChange(){
+    timeChange() {
       this.queryParam.faultStartTime = moment(this.faultTime[0]).format("YYYY-MM-DD HH:mm:ss")
       this.queryParam.faultEndTime = moment(this.faultTime[1]).format("YYYY-MM-DD HH:mm:ss")
     },
-    handleAccept(record){
-      this.$refs.acceptModel.title="楠屾敹"
+    handleAccept(record) {
+      this.$refs.acceptModel.title = "楠屾敹"
       this.$refs.acceptModel.edit(record)
     }
   }

--
Gitblit v1.9.3