From 8611a1ba1696e76cced04ff5d658ba138a05dafd Mon Sep 17 00:00:00 2001
From: zenglf <18502938215@163.com>
Date: 星期六, 19 八月 2023 14:37:32 +0800
Subject: [PATCH] 设备管理前端代码提交 截止 20230819 13:55 分

---
 src/views/eam/RepairOrderList.vue |  193 ++++++++++++++++++++---------------------------
 1 files changed, 83 insertions(+), 110 deletions(-)

diff --git a/src/views/eam/RepairOrderList.vue b/src/views/eam/RepairOrderList.vue
index 1af7be6..5f0eb3b 100644
--- a/src/views/eam/RepairOrderList.vue
+++ b/src/views/eam/RepairOrderList.vue
@@ -3,17 +3,6 @@
     title="缁翠慨宸ュ崟"
     :bordered="false"
   >
-    <!-- 鏌ヨ鍖哄煙 -->
-    <div class="table-page-search-wrapper">
-      <a-form
-        layout="inline"
-        @keyup.enter.native="searchQuery"
-      >
-        <a-row :gutter="24">
-        </a-row>
-      </a-form>
-    </div>
-    <!-- 鏌ヨ鍖哄煙-END -->
     <div class="table-page-search-wrapper">
       <a-form
         layout="inline"
@@ -21,8 +10,10 @@
       >
         <a-row :gutter="24">
           <a-col
-            :md="4"
-            :sm="8"
+            :xl="6"
+            :lg="7"
+            :md="8"
+            :sm="24"
           >
             <a-form-item label="宸ュ崟鐘舵��">
               <j-dict-select-tag
@@ -35,8 +26,10 @@
             </a-form-item>
           </a-col>
           <a-col
-            :md="4"
-            :sm="8"
+            :xl="6"
+            :lg="7"
+            :md="8"
+            :sm="24"
           >
             <a-form-item label="鍗曟嵁鍙�">
               <a-input
@@ -46,8 +39,10 @@
             </a-form-item>
           </a-col>
           <a-col
-            :md="4"
-            :sm="8"
+            :xl="6"
+            :lg="7"
+            :md="8"
+            :sm="24"
           >
             <a-form-item label="璁惧缂栫爜">
               <a-input
@@ -56,33 +51,39 @@
               ></a-input>
             </a-form-item>
           </a-col>
-          <a-col
-            :md="4"
-            :sm="8"
-          >
-            <a-form-item label="璁惧鍚嶇О">
-              <a-input
-                placeholder="璇疯緭鍏ヨ澶囧悕绉�"
-                v-model="queryParam.equipmentName"
-              ></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col
-            :md="4"
-            :sm="8"
-          >
-            <a-button
-              type="primary"
-              @click="searchQuery"
-              icon="search"
-              style="margin-right: 5px"
-            >鏌ヨ</a-button>
-            <a-button
-              @click="searchReset"
-              icon="reload"
-            >閲嶇疆</a-button>
+          <a-col :span="3">
+            <span
+              style="float: left;overflow: hidden;"
+              class="table-page-search-submitButtons"
+            >
+              <a
+                @click="handleToggleSearch"
+                style="margin-left: 8px"
+              >
+                {{ toggleSearchStatus ? '鏌ヨ鏉′欢鏀惰捣' : '璇︾粏鏌ヨ' }}
+                <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
+              </a>
+            </span>
           </a-col>
         </a-row>
+
+        <template v-if="toggleSearchStatus">
+          <a-row :gutter="24">
+            <a-col
+              :xl="6"
+              :lg="7"
+              :md="8"
+              :sm="24"
+            >
+              <a-form-item label="璁惧鍚嶇О">
+                <a-input
+                  placeholder="璇疯緭鍏ヨ澶囧悕绉�"
+                  v-model="queryParam.equipmentName"
+                ></a-input>
+              </a-form-item>
+            </a-col>
+          </a-row>
+        </template>
       </a-form>
     </div>
     <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
@@ -97,7 +98,7 @@
             key="2"
             @click="handleAddPre(2)"
           ><a-icon type="copy" />鍙傜収淇濅慨鏁呴殰鍗�</a-menu-item>
-        <a-menu-item
+          <a-menu-item
             key="2"
             @click="handleAddPre(3)"
           ><a-icon type="copy" />鍙傜収椤圭洰鎬х淮淇�</a-menu-item>
@@ -107,6 +108,17 @@
           icon="plus"
         >鏂板</a-button>
       </a-dropdown>
+
+      <a-button
+        type="primary"
+        @click="searchQuery"
+        icon="search"
+        style="margin-right: 5px"
+      >鏌ヨ</a-button>
+      <a-button
+        @click="searchReset"
+        icon="reload"
+      >閲嶇疆</a-button>
       <a-button
         hidden
         type="primary"
@@ -146,53 +158,22 @@
         :dataSource="dataSource"
         :pagination="ipagination"
         :loading="loading"
-        :rowSelection="rowSelection"
         @change="handleTableChange"
         :customRow="clickThenSelect"
       >
+        <!-- :rowSelection="rowSelection" -->
 
-        <template
-          slot="htmlSlot"
-          slot-scope="text"
+        <span
+          slot="num"
+          slot-scope="text, record"
         >
-          <div v-html="text"></div>
-        </template>
-        <template
-          slot="imgSlot"
-          slot-scope="text,record"
-        >
-          <span
-            v-if="!text"
-            style="font-size: 12px;font-style: italic;"
-          >鏃犲浘鐗�</span>
-          <img
-            v-else
-            :src="getImgView(text)"
-            :preview="record.id"
-            height="25px"
-            alt=""
-            style="max-width:80px;font-size: 12px;font-style: italic;"
-          />
-        </template>
-        <template
-          slot="fileSlot"
-          slot-scope="text"
-        >
-          <span
-            v-if="!text"
-            style="font-size: 12px;font-style: italic;"
-          >鏃犳枃浠�</span>
-          <a-button
-            v-else
-            :ghost="true"
-            type="primary"
-            icon="download"
-            size="small"
-            @click="downloadFile(text)"
-          >
-            涓嬭浇
-          </a-button>
-        </template>
+          <a
+            v-if="record.status === '3' || record.status === '4' ||record.status === '5'  ||record.status === '7' "
+            class="lot"
+            @click="handleOrderExe(record)"
+          >{{record.num}}</a>
+          <span v-else>{{record.num}}</span>
+        </span>
 
         <!-- <span
           slot="action"
@@ -345,7 +326,7 @@
         tab="鏁呴殰鎻忚堪"
         key="1"
       >
-        <FaultDescriptionList ref="FaultDescriptionList"/>
+        <FaultDescriptionList ref="FaultDescriptionList" />
       </a-tab-pane>
       <a-tab-pane
         tab="缁翠慨瑕佹眰"
@@ -467,6 +448,16 @@
       // 琛ㄥご
       columns: [
         {
+          title: '#',
+          dataIndex: '',
+          key: 'rowIndex',
+          width: 60,
+          align: "center",
+          customRender: function (t, r, index) {
+            return parseInt(index) + 1;
+          }
+        },
+        {
           title: '鐘舵��',
           align: "center",
           dataIndex: 'status_dictText'
@@ -474,7 +465,8 @@
         {
           title: '鍗曟嵁鍙�',
           align: "center",
-          dataIndex: 'num'
+          dataIndex: 'num',
+          scopedSlots: { customRender: 'num' }
         },
         {
           title: '涓氬姟绫诲瀷',
@@ -618,8 +610,6 @@
         orderReceive: "eam/repairOrder/receive",
         orderStart: "eam/repairOrder/start"
       },
-      dictOptions: {
-      },
       /* 鍒嗛〉鍙傛暟 */
       ipagination: {
         current: 1,
@@ -647,9 +637,6 @@
       sonsAddStatus: false,
     }
   },
-  // created() {
-  //   this.getSuperFieldList();
-  // },
   computed: {
     importExcelUrl: function () {
       return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
@@ -754,24 +741,10 @@
         }
         this.loading = false;
         this.$refs.FaultDescriptionList.faultId = '-1'
+        this.excuteRepairOrder = {}
       })
     },
-    // getSuperFieldList() {
-    //   let fieldList = [];
-    //   fieldList.push({ type: 'string', value: 'num', text: '缁翠慨璁㈠崟鍙�', dictCode: '' })
-    //   fieldList.push({ type: 'string', value: 'equipmentId', text: '璁惧鍙拌处ID', dictCode: '' })
-    //   fieldList.push({ type: 'string', value: 'reportRepairId', text: '鏁呴殰鎶ヤ慨鍗旾D', dictCode: '' })
-    //   fieldList.push({ type: 'string', value: 'teamId', text: '鐝粍ID', dictCode: '' })
-    //   fieldList.push({ type: 'string', value: 'faultDescription', text: '鏁呴殰鎻忚堪', dictCode: '' })
-    //   fieldList.push({ type: 'datetime', value: 'faultTime', text: '鏁呴殰鏃堕棿' })
-    //   fieldList.push({ type: 'string', value: 'photo', text: '鏁呴殰鐓х墖', dictCode: '' })
-    //   fieldList.push({ type: 'string', value: 'isStop', text: '鏄惁鍋滄満', dictCode: '' })
-    //   fieldList.push({ type: 'datetime', value: 'actualEndTime', text: '瀹為檯缁撴潫鏃堕棿' })
-    //   fieldList.push({ type: 'string', value: 'maintenanceMethod', text: '缁翠繚鏂瑰紡', dictCode: '' })
-    //   fieldList.push({ type: 'string', value: 'createBy', text: '鍒涘缓浜�', dictCode: '' })
-    //   fieldList.push({ type: 'datetime', value: 'createTime', text: '鍒涘缓鏃堕棿' })
-    //   this.superFieldList = fieldList
-    // },
+
     handleAddPre(isSelfCreate) {
       this.isSelfCreate = isSelfCreate;
       this.handleAdd();
@@ -781,9 +754,9 @@
       if (record.reportRepairId != null && record.reportRepairId != undefined && record.reportRepairId != '') {
         this.isSelfCreate = '2';
       }
-      else if(record.projectMaintenanceOrderId != null && record.projectMaintenanceOrderId != undefined && record.projectMaintenanceOrderId != ''){
+      else if (record.projectMaintenanceOrderId != null && record.projectMaintenanceOrderId != undefined && record.projectMaintenanceOrderId != '') {
         this.isSelfCreate = '3';
-      }else{
+      } else {
         this.isSelfCreate = '1';
       }
       this.handleEdit(record);

--
Gitblit v1.9.3