From 2ca94de8ede18ac07ccfd8dec7b6f6a707adde9b Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Mon, 01 Sep 2025 11:20:24 +0800
Subject: [PATCH] Merge branch 'refs/heads/feature/v5.0/5.0.5' into patch_management

---
 src/views/tickets/ticket.vue |  110 ++++++++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 100 insertions(+), 10 deletions(-)

diff --git a/src/views/tickets/ticket.vue b/src/views/tickets/ticket.vue
index 87c2bf8..486563c 100644
--- a/src/views/tickets/ticket.vue
+++ b/src/views/tickets/ticket.vue
@@ -31,7 +31,7 @@
                 :value="item.value"
               />
             </el-select> -->
-            <el-select
+            <!-- <el-select
               v-model="filters.type"
               placeholder="请选择工单类型"
               class="filter-item"
@@ -44,7 +44,7 @@
                 :label="item.label"
                 :value="item.value"
               />
-            </el-select>
+            </el-select> -->
             <el-date-picker
               v-model="filters.dateRange"
               type="daterange"
@@ -69,7 +69,7 @@
                 :value="item.value"
               />
             </el-select>
-            <el-select
+            <!-- <el-select
               v-model="filters.algorithm"
               placeholder="请选择关联算法"
               class="filter-item"
@@ -82,7 +82,42 @@
                 :label="item.dict_value"
                 :value="item.dict_key"
               />
-            </el-select>
+            </el-select> -->
+            <!-- <el-tree-select
+              popper-class="custom-tree-select"
+              :style="{ width: pxToRem(186) }"
+              placeholder="请选择关联算法"
+              v-model="dictKey"
+              :data="dataList"
+              :default-expanded-keys="[dictKey]"
+              check-strictly
+              node-key="id"
+              :props="treePropsSF"
+              @node-click="handleSFNodeClick"
+              clearable
+              @clear="handleClear"
+            /> -->
+            <el-tree-select
+              style="z-index: 1000"
+              :teleported="false"
+              class="custom-tree-select"
+              :style="{ width: pxToRem(186) }"
+              v-model="dictKey"
+              :data="dataList"
+              :default-expanded-keys="[dictKey]"
+              :props="treePropsSF"
+              :render-after-expand="false"
+              :default-checked-keys="checkedKeys"
+              node-key="id"
+              multiple
+              show-checkbox
+              collapse-tags
+              collapse-tags-tooltip
+              clearable
+              @check="handleCheck"
+              @node-click="handleSFNodeClick"
+              @clear="handleClear"
+            />
             <el-select
               v-model="filters.isReview"
               placeholder="请选择复核状态"
@@ -639,7 +674,7 @@
                 </template>
                 <template v-else>
                   <div class="media-title">地图标记事件点
-                    <el-popover   v-if="currentDetail.status === 3"
+                    <el-popover   v-if="currentDetail.status === 3 || currentDetail.status === 0"
 								popper-class="custom-qrcode-popover"
 								:width="120"
 								:visible="currentDetail.showQR && detailVisible"
@@ -899,6 +934,7 @@
   getReviewById,
   getCreateEventJob,
 } from '@/api/tickets/ticket'
+import { getSFDictionaryTree  } from '@/api/job/task';
 import { export_json_to_excel } from '@/utils/exportExcel'
 import geoJson from '@/assets/geoJson.json'
 import { mapGetters } from 'vuex'
@@ -990,9 +1026,9 @@
           // { label: "序号", prop: "id", width: 70 },
           { label: '工单编号', prop: 'orderNumber', width: 170 },
           { label: '工单名称', prop: 'orderName', width: 150, overHidden: true, tooltip: true },
-          { label: '所属单位', prop: 'department',width: 150, overHidden: true, tooltip: true },
+          { label: '所属单位', prop: 'department', overHidden: true, tooltip: true },
           { label: '发起时间', prop: 'startTime', width: 160 },
-          { label: '关联算法', prop: 'aiType', width: 150, overHidden: true, tooltip: true },
+          { label: '关联算法', prop: 'aiType', overHidden: true, tooltip: true },
           {
             label: '工单类型',
             prop: 'type',
@@ -1111,6 +1147,14 @@
 
       // 复核弹窗
       reCheckDialog: false,
+      treePropsSF: {
+        label: 'dictValue',
+        value: 'id',
+        children: 'children',
+      },
+      dictKey: '',
+      dataList: [],
+      checkedKeys: [],
     };
   },
   created() {
@@ -1123,6 +1167,8 @@
   },
 
   mounted() {
+
+    this.getAlgorithmList()
 
     const href = this.$route.href;
     if (this.$route?.query?.status !== undefined && this.$route?.query?.status !== null) {
@@ -1392,6 +1438,49 @@
   },
 
   methods: {
+    handleCheck(data, { checkedKeys, checkedNodes }) {
+      this.checkedKeys = checkedKeys
+      // 获取所有选中节点的 dictKey
+      const selectedDictKeys = checkedNodes.map(node => node.dictKey).filter(Boolean)
+      this.filters.type = selectedDictKeys
+      this.fetchTableData();
+    },
+    // 算法
+    getAlgorithmList() {
+      getSFDictionaryTree({code:'SF'}).then((res) => {
+          if (res.data.code === 200) {
+              const result = res.data.data[0].children
+              // 过滤第一层数据
+              const filteredData = result.map(item => {
+                  // 过滤第二层数据
+                  const children = item.children?.map(child => ({
+                      ...child,
+                      children: [] // 清空第三层数据
+                  }))
+                  return {
+                      ...item,
+                      children: children || []
+                  }
+              })
+              this.dataList = filteredData
+          }
+      })
+    },
+
+    handleSFNodeClick(data) {
+      console.log(data.dictKey, '666666666')
+      this.filters.type = ''
+      this.filters.algorithm = ''
+      this.filters.type = data.dictKey
+      // 更新列表请求
+      this.fetchTableData();
+    },
+    handleClear() {
+        this.dictKey = ''
+        this.filters.algorithm = ''
+         this.filters.type = ''
+        this.fetchTableData();
+    },
     handleCellClick(row, column) {
       console.log(row, column.no);
       if (column.no === 2) {
@@ -1613,7 +1702,7 @@
       try {
         const currentTab = this.tabs.find(tab => tab.name === this.activeTab);
         const params = {
-          word_order_type: this.filters.type || undefined,
+          word_order_types: this.filters.type || undefined,
           status:
             currentTab?.name === 'myTickets'
               ? undefined
@@ -1950,6 +2039,7 @@
     },
 
     handleReset() {
+      this.dictKey = '';
       this.filters = {
         keyword: '',
         department: '',
@@ -3037,11 +3127,11 @@
   gap: 8px; // 使用 gap 统一设置间距
 
   .filter-item {
-    width: 160px; // 减小宽度
+    width: 280px; // 减小宽度
   }
 
   .date-picker {
-    width: 240px; // 日期选择器宽度适当调整
+    // width: 240px; // 日期选择器宽度适当调整
   }
 
   .el-button {

--
Gitblit v1.9.3