From 151de4bd0a61d6377dd13be7f165c7ed40c97306 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Wed, 16 Jul 2025 11:37:33 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/tickets/ticket.vue   |  114 ++++++++++++-------------------------
 src/views/tickets/orderLog.vue |    6 +-
 src/styles/element-ui.scss     |   23 +++++++
 3 files changed, 64 insertions(+), 79 deletions(-)

diff --git a/src/styles/element-ui.scss b/src/styles/element-ui.scss
index 47078bb..938aeb8 100644
--- a/src/styles/element-ui.scss
+++ b/src/styles/element-ui.scss
@@ -115,4 +115,27 @@
     display: flex;
     flex-direction: column;
   }
+}
+
+.ztzf-public-general-avue-crud {
+  .el-table {
+    tr {
+      min-height: 30px !important;
+      line-height: 30px !important;
+      box-sizing: border-box !important;
+    }
+
+    tr th,
+    tr td {
+      padding: 6px 0 !important;
+      min-height: 30px !important;
+      line-height: 30px !important;
+      box-sizing: border-box !important;
+
+      div.cell {
+        min-height: 30px !important;
+        line-height: 30px !important;
+      }
+    }
+  }
 }
\ No newline at end of file
diff --git a/src/views/tickets/orderLog.vue b/src/views/tickets/orderLog.vue
index 514e6dd..78394f5 100644
--- a/src/views/tickets/orderLog.vue
+++ b/src/views/tickets/orderLog.vue
@@ -90,9 +90,9 @@
           </div>
 
           <!-- 表格部分 -->
-          <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" v-if="activeTab === tab.name">
+          <avue-crud class="ztzf-public-general-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" 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>
diff --git a/src/views/tickets/ticket.vue b/src/views/tickets/ticket.vue
index f8e14f5..84138c0 100644
--- a/src/views/tickets/ticket.vue
+++ b/src/views/tickets/ticket.vue
@@ -31,9 +31,10 @@
           </div>
 
           <!-- 表格部分 -->
-          <avue-crud ref="avueCrud" v-model="tableData" :option="option" :data="tableData" v-model:page="page"
-            @size-change="sizeChange" @current-change="handleCurrentChange" @refresh-change="refreshChange" :table-loading="loading"
-            @selection-change="handleSelectionChange" :permission="permissionList" v-if="activeTab === tab.name">
+          <avue-crud class="ztzf-public-general-avue-crud" ref="avueCrud" v-model="tableData" :option="option"
+            :data="tableData" v-model:page="page" @size-change="sizeChange" @current-change="handleCurrentChange"
+            :table-loading="loading" @selection-change="handleSelectionChange" :permission="permissionList"
+            v-if="activeTab === tab.name">
             <template #menu-left>
               <el-button v-if="(activeTab === 'all' || activeTab === 'myTickets') && permissionList.addBtn"
                 type="primary" icon="el-icon-plus" @click="handleAdd">新建工单</el-button>
@@ -53,11 +54,8 @@
                 <el-button type="text" icon="el-icon-view" @click="handleViewDetail(row)">详情</el-button>
               </template>
 
-              <template v-if="permission.tickets_repeat_review">
-                <el-button v-if="row.status === 4 && row.isReview !== 1" type="text" icon="el-icon-check"
-                           @click="reCheck(row)">复核</el-button>
-              </template>
-
+              <el-button v-if="row.status === 4 && row.isReview !== 1" type="text" icon="el-icon-check"
+                @click="reCheck(row)">复核</el-button>
             </template>
             <template #status="{ row }">
               <span :style="getStatusTagType(row.status) ? 'color:' + getStatusTagType(row.status) : ''">
@@ -148,22 +146,12 @@
             </el-col>
             <el-col :span="12">
               <el-form-item label="附件图片" prop="photos" required class="upload-wrapper">
-                <el-upload v-if="createoredit === 1" ref="upload" :action="'#'" :auto-upload="false" list-type="picture-card"
+                <el-upload ref="upload" :action="'#'" :auto-upload="false" list-type="picture-card"
                   :on-change="handleFileChange" :on-remove="handleUploadRemove" :before-upload="beforeUpload"
                   :file-list="form.photos" :limit="1" accept="image/*" class="create-upload">
                   <template v-if="form.photos.length < 1">
                     <!-- <i class="el-icon-plus">+</i> -->
-                      <div class="el-icon-plus">
-                      <span>+</span>
-                    </div>
-                  </template>
-                </el-upload>
-                  <el-upload v-else ref="upload" :action="'#'" :auto-upload="false" list-type="picture-card"
-                  :on-change="handleFileChange" :on-remove="handleUploadRemove" :before-upload="beforeUpload"
-                  :file-list="popupShowImage(form.photos)" :limit="1" accept="image/*" class="create-upload">
-                  <template v-if="form.photos.length < 1">
-                   
-                      <div class="el-icon-plus">
+                    <div class="el-icon-plus">
                       <span>+</span>
                     </div>
                   </template>
@@ -186,8 +174,10 @@
     <!-- 工单详情对话框 -->
     <el-dialog v-model="detailVisible" title="工单详情" width="80%" append-to-body>
       <div class="detail-container">
-        <div class="detail-top-title">  <div class="event-title-center event-orderNumber">{{ currentDetail.orderNumber || '工单编号' }}</div>
-        <div class="event-title-center">{{ currentDetail.orderName || '事件名称' }}</div></div>
+        <div class="detail-top-title">
+          <div class="event-title-center event-orderNumber">{{ currentDetail.orderNumber || '工单编号' }}</div>
+          <div class="event-title-center">{{ currentDetail.orderName || '事件名称' }}</div>
+        </div>
         <div v-if="totalTime" class="event-total-time">
           总耗时:{{ totalTime }}
         </div>
@@ -321,8 +311,8 @@
             <template v-if="!currentDetail.photos || currentDetail.photos.length < 1">
               <!-- <i class="el-icon-plus">+</i> -->
               <div class="el-icon-plus">
-                      <span>+</span>
-                    </div>
+                <span>+</span>
+              </div>
             </template>
           </el-upload>
           <div class="el-upload__tip" v-if="hasProcessedAndOverBtnPermission()">
@@ -517,11 +507,9 @@
 </template>
 
 <script>
-import { getSmallImg,getShowImg } from '@/utils/util';
 import { ElMessageBox, ElLoading } from 'element-plus'
 import { calculateDefaultRange } from '@/utils/util'
 import { gcj02ToWgs84, wgs84ToGcj02 } from '@/utils/coordinateTransformation'
-import _ from 'lodash'
 import {
   getList,
   createTicket,
@@ -534,6 +522,7 @@
 } from '@/api/tickets/ticket'
 import { export_json_to_excel } from '@/utils/exportExcel'
 import geoJson from '@/assets/geoJson.json'
+
 import { mapGetters } from 'vuex'
 import { getAdcodeObj } from '@/utils/disposeData'
 function regExp (label, name) {
@@ -553,7 +542,6 @@
       dispatchLoading: false,
       completeLoading: false,
       finalizeLoading: false,
-      createoredit:'',
       activeTab: 'all',
       // tabs 只保留静态结构,不做权限判断
       tabs: [
@@ -745,11 +733,6 @@
 
   mounted () {
     const href = this.$route.href
-    if (this.$route?.query?.status !== undefined && this.$route?.query?.status !== null){
-      this.filters.status = this.$route?.query?.status + ''
-      this.$router.replace({})
-    }
-
     let curQueryParams = {}
 
     if (href.indexOf('?') != -1 && href.split('?').length > 0) {
@@ -911,7 +894,7 @@
         { label: '关联任务', value: this.currentDetail.job_name || '/' },
         { label: '任务发起人', value: this.currentDetail.creator },
         { label: '当前状态', value: this.mapStatus(this.currentDetail.status) },
-        { label: '事件地址', value: this.currentDetail.address || this.currentDetail.latAndLon }, // 包含经纬度信息
+        { label: '事件地址', value: this.currentDetail.address }, // 包含经纬度信息
         { label: '关联算法', value: this.currentDetail.aiType },
         { label: '发起单位', value: this.currentDetail.department },
         { label: '发起任务时间', value: this.currentDetail.startTime },
@@ -988,16 +971,6 @@
         return '/'
       }
     },
-
-    popupShowImage () {
-      return (list) => {
-
-        return list.map(item => ({
-          ...item,
-          url: getShowImg(item.url)
-        }))
-      }
-    }
   },
 
   methods: {
@@ -1380,18 +1353,18 @@
         if (response.data.code === 0) {
           this.$message.success('草稿保存成功')
           this.dialogVisible = false
-          this.form={
-        name: '',
-        type: '',
-        department: '',
-        handler: '',
-        algorithm: [], // 关联算法改为数组
-        location: [], // 将存储为[经度, 纬度, 地址]格式
-        address: '',
-        photos: [],
-        content: '', // 新增字段,用于存储后端返回的 content
-      },
-          this.fetchTableData()
+          this.form = {
+            name: '',
+            type: '',
+            department: '',
+            handler: '',
+            algorithm: [], // 关联算法改为数组
+            location: [], // 将存储为[经度, 纬度, 地址]格式
+            address: '',
+            photos: [],
+            content: '', // 新增字段,用于存储后端返回的 content
+          },
+            this.fetchTableData()
         } else {
           throw new Error(response.data.msg || '保存失败')
         }
@@ -1504,8 +1477,6 @@
     },
 
     async handleCurrentChange (val) {
-  
-    
       // 先更新页码
       this.page.currentPage = val
       // 等待 DOM 更新后再请求数据
@@ -1514,7 +1485,6 @@
     },
 
     async sizeChange (val) {
-
       this.page.pageSize = val
       this.page.currentPage = 1 // 重置到第一页
       await this.$nextTick()
@@ -1522,8 +1492,6 @@
     },
 
     handleAdd () {
-  
-    this.createoredit =1
       this.dialogVisible = true
       this.mapParams.center = null
       this.form.location = []
@@ -1555,7 +1523,6 @@
     },
 
     async handleViewDetail (row) {
-
       // 找到当前行在tableData中的索引
       this.currentIndex = this.tableData.findIndex(item => item.id === row.id)
       // 先设置workType,直接从row读取
@@ -1619,14 +1586,9 @@
           this.stepInfos = []
         }
       }
-      console.log(detailData,'detailDatadetailDatadetailData');
-      this.currentDetail = {
-        ...detailData,
-        address:null,
-        latAndLon: _.round(detailData.location[0],6) + ',' + _.round(detailData.location[1],6)
-      }
 
-       console.log('this.currentDetail',this.currentDetail);
+      this.currentDetail = detailData
+      console.log('this.currentDetail', this.currentDetail)
       this.detailVisible = true
       this.$nextTick(() => {
         if (this.$refs.MapContainer && this.$refs.MapContainer.initAddEntity) {
@@ -2040,7 +2002,6 @@
 
     // 添加编辑方法
     handleEdit (row) {
-    this.createoredit = 2
       console.log('编辑原始数据:', row)
 
       // 尝试从row.dept_id或通过部门名称查找对应的部门ID
@@ -2116,7 +2077,6 @@
         address: row.address || '',
         content: row.content,
         photos: [],
-    
       }
 
       let curLocation = []
@@ -2190,7 +2150,6 @@
 
     // 添加选择变化处理方法
     handleSelectionChange (selection) {
- 
       this.selections = selection
       console.log('已选择的行:', selection)
     },
@@ -2815,12 +2774,15 @@
 
 .detail-container {
   padding: 20px;
+
   .detail-top-title {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  .event-orderNumber{
-  margin-right: 10px;}
+    display: flex;
+    justify-content: center;
+    align-items: center;
+
+    .event-orderNumber {
+      margin-right: 10px;
+    }
   }
 }
 

--
Gitblit v1.9.3