From 19aff1ac87030b21d2b01cdca5d5604c840ba7c0 Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期一, 21 七月 2025 21:36:31 +0800
Subject: [PATCH] 维修工单

---
 src/views/system/modules/QuartzJobListModal.vue |   89 +++++++++++++++++++++++++++++++-------------
 1 files changed, 63 insertions(+), 26 deletions(-)

diff --git a/src/views/system/modules/QuartzJobListModal.vue b/src/views/system/modules/QuartzJobListModal.vue
index 32e14c5..8a79cab 100644
--- a/src/views/system/modules/QuartzJobListModal.vue
+++ b/src/views/system/modules/QuartzJobListModal.vue
@@ -10,20 +10,21 @@
 
             <a-col :md="6" :sm="6">
               <a-form-item label="浠诲姟鍚嶇О">
-                <a-input placeholder="璇疯緭鍏ヤ换鍔″悕绉�" v-model="queryParam.jobClassName"></a-input>
+                <a-input placeholder="璇疯緭鍏ヤ换鍔″悕绉�" v-model="queryParam.jobName"></a-input>
               </a-form-item>
             </a-col>
 
             <a-col :md="6" :sm="6">
               <a-form-item label="鏃堕棿">
-                <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYY-MM-DD HH:mm:ss" v-model="dates"/>
+                <a-range-picker show-time @change="dateParamChange" :disabledDate="disabledDate" format="YYYY-MM-DD HH:mm:ss" v-model="dates"/>
               </a-form-item>
             </a-col>
-            <a-col :md="2" :sm="2">
-              <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
-            </a-col>
-            <a-col :md="2" :sm="2">
-              <a-button type="primary" icon="download" @click="handleExportXls('鎵ц鏃ュ織瀵煎嚭')">瀵煎嚭</a-button>
+            <a-col :md="4" :sm="4">
+              <a-space>
+                <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
+                <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>
+                <a-button type="primary" icon="download" @click="handleExportXls('鎵ц鏃ュ織瀵煎嚭')">瀵煎嚭</a-button>
+              </a-space>
             </a-col>
           </a-row>
         </a-form>
@@ -44,9 +45,7 @@
             <a-tag v-if="isSuccess==-1" color="red">澶辫触</a-tag>
           </template>
           <span slot="action" slot-scope="text, record">
-
-             <a v-if="record.isSuccess == -1" @click="executeImmediately(record)">鏌ョ湅璇︽儏</a>
-
+             <a @click="executeImmediately(record)">鏌ョ湅璇︽儏</a>
         </span>
         </a-table>
       </div>
@@ -137,6 +136,7 @@
         superQueryParams: '',
         /** 楂樼骇鏌ヨ鎷兼帴鏂瑰紡 */
         superQueryMatchType: 'and',
+
         columns: [
           {
             title: '#',
@@ -148,29 +148,29 @@
               return parseInt(index) + 1;
             }
           },
+          // {
+          //   title: '浠诲姟鍚嶇О',
+          //   align: 'center',
+          //   dataIndex: 'jobClassName',
+          // },
+          // {
+          //   title: 'cron琛ㄨ揪寮�',
+          //   align: 'center',
+          //   dataIndex: 'cronExpression',
+          // },
           {
-
             title: '浠诲姟鍚嶇О',
             align: 'center',
-            dataIndex: 'jobClassName',
-          },
-          {
-            title: 'cron琛ㄨ揪寮�',
-            align: 'center',
-            dataIndex: 'cronExpression',
+            dataIndex: 'jobName'
           },
           {
             title: '鍙傛暟',
             align: 'center',
             dataIndex: 'parameter'
           },
+
           {
-            title: '鎻忚堪',
-            align: 'center',
-            dataIndex: 'description'
-          },
-          {
-            title: '鎶ラ敊淇℃伅',
+            title: '鏃ュ織淇℃伅',
             dataIndex: 'action',
             align:"center",
             scopedSlots: { customRender: 'action' },
@@ -190,10 +190,33 @@
             title: '鎵ц鏃堕棿锛堟绉掞級',
             align: 'center',
             dataIndex: 'executionTime',
+            customRender:(t,r,index) =>{
+              var milliseconds = parseInt(t)
+                let hours = Math.floor(milliseconds / 3600000);
+                milliseconds = milliseconds % 3600000;
+                let minutes = Math.floor(milliseconds / 60000);
+                milliseconds = milliseconds % 60000;
+                let seconds = Math.floor(milliseconds / 1000);
+                milliseconds = milliseconds % 1000;
+                if(hours == 0){
+                  if(minutes == 0){
+                    if(seconds == 0) {
+                      return `${milliseconds}姣`
+                    }else{
+                      return `${seconds}绉� ${milliseconds}姣`
+                    }
+                  }else{
+                    return `${minutes}鍒嗛挓 ${seconds}绉� ${milliseconds}姣`;
+                  }
+                }else{
+                  return `${hours}灏忔椂 ${minutes}鍒嗛挓 ${seconds}绉� ${milliseconds}姣`;
+                }
+
+            }
 
           },
           {
-            title: '鍒涘缓鏃堕棿',
+            title: '浠诲姟鎵ц鏃堕棿',
             align: 'center',
             dataIndex: 'createTime'
           },
@@ -216,9 +239,16 @@
 
     },
     methods: {
+      searchReset() {
+        let id =  this.queryParam.jobId
+        this.queryParam = {}
+        this.dates = []
+        this.queryParam.jobId = id
+        this.loadData(1);
+      },
       executeImmediately:function (record) {
         this.$refs.modalForm.showDetails(record);
-        this.$refs.modalForm.title = "鎶ラ敊淇℃伅";
+        this.$refs.modalForm.title = "鏃ュ織淇℃伅";
         this.$refs.modalForm.disableSubmit = false;
       },
       handleExportXls(fileName){
@@ -290,6 +320,9 @@
         param.field = this.getQueryField();
         param.pageNo = this.ipagination.current;
         param.pageSize = this.ipagination.pageSize;
+        param.jobId = this.queryParam.jobId;
+        param.startTime = this.queryParam.startTime;
+        param.endTime =  this.queryParam.endTime;
         //鑾峰彇鐢ㄦ埛瀹氬埗鐨勫弬鏁板睘鎬�
         // if (this.getCustomQueryParams) {
         //   param = this.getCustomQueryParams(param);
@@ -338,7 +371,11 @@
             }
             //update-end---author:zhangyafei    Date:20201118  for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
           }else{
-            this.$message.warning(res.message)
+            // this.$message.warning(res.message)
+            this.$notification.warning({
+              message:'娑堟伅',
+              description:res.message
+            });
           }
         }).finally(() => {
           this.loading = false

--
Gitblit v1.9.3