From 4bb904fc27caf0576ed7dbf46d5909a7b1f778c0 Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Mon, 14 Jul 2025 09:52:28 +0800
Subject: [PATCH] Merge branch 'test' of http://139.196.74.78:10010/r/drone/drone-web-manage into test

---
 src/views/tickets/orderLog.vue |  204 ++++++++++++++++++++++++++++++--------------------
 1 files changed, 123 insertions(+), 81 deletions(-)

diff --git a/src/views/tickets/orderLog.vue b/src/views/tickets/orderLog.vue
index fab04ab..514e6dd 100644
--- a/src/views/tickets/orderLog.vue
+++ b/src/views/tickets/orderLog.vue
@@ -4,15 +4,15 @@
  * @LastEditors: shuishen 1109946754@qq.com
  * @LastEditTime: 2025-04-28 11:38:16
  * @FilePath: \drone-web-manage\src\views\tickets\orderLog.vue
- * @Description: 
- * 
- * Copyright (c) 2025 by shuishen, All Rights Reserved. 
+ * @Description:
+ *
+ * Copyright (c) 2025 by shuishen, All Rights Reserved.
 -->
 <template>
   <basic-container>
     <el-tabs v-model="activeTab" @tab-click="handleTabChange">
       <el-tab-pane v-for="tab in filteredTabs" :key="tab.name" :label="`${tab.label} (${tab.count})`" :name="tab.name">
-        <div class="tab-content">
+        <basic-main-content>
           <!-- 查询条件筛选栏 -->
           <div class="filter-bar">
             <div class="search-bar-box">
@@ -92,7 +92,7 @@
           <!-- 表格部分 -->
           <avue-crud :data="tableData" :option="option" v-model:page="page" ref="crud" :table-loading="loading"
             @current-change="currentChange" @refresh-change="refreshChange" @on-load="onLoad"
-            @search-change="searchChange" @size-change="sizeChange">
+            @search-change="searchChange" @size-change="sizeChange" v-if="activeTab === tab.name">
             <template #menu-left>
               <el-button v-if="hasAddBtnPermission() && activeTab != 'WAIT_AUDIT'" type="primary" icon="el-icon-plus"
                 @click="handleAdd">新建工单</el-button>
@@ -111,7 +111,9 @@
                   " -->
                 <template v-if="row.status == 1">
                   <!--待审核状态-->
-                  <el-button type="text" icon="el-icon-warning" @click="orderLogRecall(row.id)">撤回</el-button>
+                  <el-button type="text" icon="el-icon-warning" v-if="hasRecallPaddingBtnPermission()"
+                    @click="orderLogRecall(row.id)">撤回</el-button>
+                  <el-button type="text" icon="el-icon-view" @click="handleViewDetail(row)">详情</el-button>
                 </template>
                 <!--已驳回-->
                 <template v-if="row.status == 2">
@@ -139,7 +141,7 @@
               </el-tooltip>
             </template>
           </avue-crud>
-        </div>
+        </basic-main-content>
       </el-tab-pane>
     </el-tabs>
 
@@ -341,7 +343,7 @@
             <!-- <el-button type="primary" v-if="form.status == 0 || userInfo.user_id == form.create_user"
                             @click="submitForm(0)">保存</el-button> -->
 
-            <el-button type="primary" v-if="form.status == 1 && this.permission.orderLogpass"
+            <el-button type="primary" v-if="form.status == 1 && hasPaddingBtnPermission()"
               @click="orderLogPass(form.id)">通过</el-button>
             <el-button type="danger" v-if="form.status == 1 && hasRejectionBtnPermission()"
               @click="orderLogReject(form.id)">驳回</el-button>
@@ -465,7 +467,7 @@
             <!-- <el-button type="primary" v-if="form.status == 0 || userInfo.user_id == form.create_user"
                             @click="submitForm(0)">保存</el-button> -->
 
-            <el-button type="primary" v-if="form.status == 1 && this.permission.orderLogpass"
+            <el-button type="primary" v-if="form.status == 1 && hasPaddingBtnPermission()"
               @click="orderLogPass(form.id)">通过</el-button>
             <el-button type="danger" v-if="form.status == 1 && hasRejectionBtnPermission()"
               @click="orderLogReject(form.id)">驳回</el-button>
@@ -566,20 +568,60 @@
         menu: true,
         menuWidth: 210,
         menuClassName: 'cur-menu',
-        column: [
-          { label: '工单编号', prop: 'job_info_num', width: 100, ellipsis: true, overHidden: true },
-          { label: '工单名称', prop: 'name', width: 100, ellipsis: true, overHidden: true },
-          { label: '工单状态', prop: 'status', width: 88 },
-          { label: '所属单位', prop: 'dept_name', width: 100, ellipsis: true },
-          { label: '发起时间', prop: 'create_time', width: 144, ellipsis: true },
-          { label: '已执行次数', prop: 'job_num', width: 96, ellipsis: true },
-          { label: '工单内容', prop: 'content', ellipsis: true, overHidden: true },
-          { label: '关联航线', prop: 'wayline_name', width: 100, ellipsis: true, overHidden: true },
-          { label: '关联算法', prop: 'ai_type_str', width: 100, ellipsis: true, overHidden: true },
-          { label: '关联机巢', prop: 'device_names', width: 100, ellipsis: true, overHidden: true },
 
-          { label: '创建人', prop: 'creator_name', width: 96, ellipsis: true, overHidden: true },
-          { label: '关联机巢', prop: 'device_names', width: 112, ellipsis: true, overHidden: true },
+        height: 'auto',
+        calcHeight: 196,
+
+        column: [
+          {
+            label: '工单编号', prop: 'job_info_num', width: 100, ellipsis: true, overHidden: true,
+            showOverflowTooltip: true,
+          },
+          {
+            label: '工单名称', prop: 'name', width: 100, ellipsis: true, overHidden: true,
+            showOverflowTooltip: true,
+          },
+          {
+            label: '工单状态', prop: 'status', width: 88,
+            showOverflowTooltip: true,
+          },
+          {
+            label: '所属单位', prop: 'dept_name', width: 100, ellipsis: true,
+            showOverflowTooltip: true,
+          },
+          {
+            label: '发起时间', prop: 'create_time', width: 144, ellipsis: true,
+            showOverflowTooltip: true,
+          },
+          {
+            label: '已执行次数', prop: 'job_num', width: 96, ellipsis: true,
+            showOverflowTooltip: true,
+          },
+          {
+            label: '工单内容', prop: 'content', ellipsis: true, overHidden: true,
+            showOverflowTooltip: true,
+          },
+          {
+            label: '关联航线', prop: 'wayline_name', width: 100, ellipsis: true, overHidden: true,
+            showOverflowTooltip: true,
+          },
+          {
+            label: '关联算法', prop: 'ai_type_str', width: 100, ellipsis: true, overHidden: true,
+            showOverflowTooltip: true,
+          },
+          {
+            label: '关联机巢', prop: 'device_names', width: 100, ellipsis: true, overHidden: true,
+            showOverflowTooltip: true,
+          },
+
+          {
+            label: '创建人', prop: 'creator_name', width: 96, ellipsis: true, overHidden: true,
+            showOverflowTooltip: true,
+          },
+          {
+            label: '关联机巢', prop: 'device_names', width: 112, ellipsis: true, overHidden: true,
+            showOverflowTooltip: true,
+          },
           {
             label: '工单周期频次',
             prop: '',
@@ -587,6 +629,7 @@
             formatter: row => this.formatCycleTime(row),
             html: true,
             ellipsis: true,
+            showOverflowTooltip: true,
             // overHidden: true
           },
         ],
@@ -1083,7 +1126,7 @@
 
         //按照航线来
         const params = {
-          type: currentLine.wayline_type,
+          type: [2, 4, 5].includes(currentLine.wayline_type) ? 2 : 0,
           wayline_id: waylineId,
           polygon
         }
@@ -1114,6 +1157,9 @@
       let data = response.data.data
       this.$message.success('审核通过')
       this.detailVisibleCopy = false
+
+      this.page.currentPage = 1
+      this.onLoad(this.page, this.query)
     },
     /**
      * 驳回
@@ -1125,8 +1171,11 @@
       }).then(async ({ value }) => {
         let response = await orderLogReject(id, value)
         let data = response.data.data
-        this.$message.success('驳回成果')
+        this.$message.success('驳回成功')
         this.detailVisibleCopy = false
+
+        this.page.currentPage = 1
+        this.onLoad(this.page, this.query)
       })
     },
   },
@@ -1143,42 +1192,32 @@
 </script>
 
 <style lang="scss" scoped>
-:deep() {
-  .avue-crud__body {
-    .el-form {
-      height: 625px;
-      overflow: auto;
+::v-deep(.el-tabs) {
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+
+  .el-tabs__header {
+    order: 1;
+  }
+
+  .el-tabs__content {
+    order: 2;
+  }
+
+  .el-tabs__content {
+    height: 0;
+    flex: 1;
+    display: flex;
+    flex-direction: column;
+
+    .el-tab-pane {
+      height: 0;
+      flex: 1;
+      display: flex;
+      flex-direction: column;
     }
   }
-}
-
-:deep(.el-pagination .el-select) {
-  width: 128px !important;
-}
-
-.step-timer {
-  position: absolute;
-  left: 80%;
-  top: 50%;
-  transform: translateY(-50%);
-  width: 100px;
-  margin-left: 4px;
-  color: #666;
-  font-size: 12px;
-}
-
-:deep(.el-textarea__inner) {
-  padding: 8px 12px;
-}
-
-:deep(.el-input__inner),
-:deep(.el-select),
-:deep(.el-select .el-input) {
-  width: 100%; // 确保所有输入框和选择框宽度一致
-}
-
-.tab-content {
-  padding: 10px;
 }
 
 .filter-bar {
@@ -1211,6 +1250,31 @@
   }
 }
 
+:deep(.el-pagination .el-select) {
+  width: 128px !important;
+}
+
+.step-timer {
+  position: absolute;
+  left: 80%;
+  top: 50%;
+  transform: translateY(-50%);
+  width: 100px;
+  margin-left: 4px;
+  color: #666;
+  font-size: 12px;
+}
+
+:deep(.el-textarea__inner) {
+  padding: 8px 12px;
+}
+
+:deep(.el-input__inner),
+:deep(.el-select),
+:deep(.el-select .el-input) {
+  width: 100%; // 确保所有输入框和选择框宽度一致
+}
+
 .action-bar {
   margin-bottom: 16px;
 }
@@ -1218,25 +1282,6 @@
 .el-tabs {
   :deep(.el-tabs__content) {
     overflow: visible;
-  }
-}
-
-.tab-content {
-  min-height: 200px;
-}
-
-.detail-form {
-  :deep(.el-form-item) {
-    margin-bottom: 10px;
-  }
-
-  :deep(.el-form-item__label) {
-    color: #606266;
-    font-weight: normal;
-  }
-
-  :deep(.el-form-item__content) {
-    color: #303133;
   }
 }
 
@@ -1328,12 +1373,9 @@
 
     &> ::v-deep(.el-button) {
       flex: 1;
-      max-width: 44px;
+      margin-left: 0;
       margin-right: 10px;
 
-      &:nth-child(4n) {
-        margin-left: 0;
-      }
     }
   }
 }

--
Gitblit v1.9.3