From f8c827392607967121c5f9a57894645f18ad5953 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期二, 15 四月 2025 18:14:13 +0800
Subject: [PATCH] 代码初始化

---
 admin/src/views/business/workorderDbh.vue |   35 ++++++++++++++++++++++++++++++-----
 1 files changed, 30 insertions(+), 5 deletions(-)

diff --git a/admin/src/views/business/workorderDbh.vue b/admin/src/views/business/workorderDbh.vue
index 00d192b..a97e340 100644
--- a/admin/src/views/business/workorderDbh.vue
+++ b/admin/src/views/business/workorderDbh.vue
@@ -3,13 +3,25 @@
     <!-- 鎼滅储琛ㄥ崟 -->
     <div slot="search-form">
       <el-form ref="searchForm" :model="searchForm" label-width="100px" inline>
-        <el-form-item label="椋庨櫓绫诲瀷" prop="typeId">
-          <el-cascader  v-model="searchForm.categoryList" :options="categorys" @change="handleChangeCategory" :show-all-levels="false"
+        <el-form-item label="椋庨櫓绫诲瀷" prop="typeIdPath">
+<!--          <el-cascader  v-model="searchForm.categoryList" :options="categorys" @change="handleChangeCategory" :show-all-levels="false"
                         clearable filterable :props="categoryprops"  >
             <template slot-scope="{ node, data }">
-              <span>{{ data.name }}</span> <!-- 鑷畾涔夋樉绀哄唴瀹� -->
+              <span>{{ data.name }}</span> &lt;!&ndash; 鑷畾涔夋樉绀哄唴瀹� &ndash;&gt;
             </template>
-          </el-cascader>
+          </el-cascader>-->
+          <treeselect
+              style="width: 150px"
+              v-model="searchForm.typeIdPath"
+              placeholder="浼ゅ绫诲瀷"
+              clearable
+              :options="categorys"
+              :normalizer="normalizeOptions"
+              :default-expand-level="1"
+              @input="search"
+              noChildrenText="娌℃湁瀛愰�夐」"
+              noOptionsText="娌℃湁鍙�夐」"
+              noResultsText="娌℃湁鍖归厤鐨勭粨鏋�" />
         </el-form-item>
         <el-form-item label="涓婃姤浜哄憳" prop="memberName">
           <el-input v-model="searchForm.memberName" clearable placeholder="浜哄憳濮撳悕鎴栨墜鏈哄彿" @keypress.enter.native="search"></el-input>
@@ -50,6 +62,7 @@
         </el-table-column>
         <el-table-column prop="submitDate" label="涓婃姤鏃堕棿" min-width="150px"></el-table-column>
         <el-table-column prop="happenTime" label="鍙戠幇鏃堕棿" min-width="150px"></el-table-column>
+        <el-table-column prop="locationName" label="鍙戠敓鍦扮偣" min-width="100px"></el-table-column>
         <el-table-column prop="riskInfo" label="椋庨櫓鎻忚堪" min-width="100px"></el-table-column>
         <el-table-column prop="memberName" label="涓婃姤浜哄憳" min-width="100px">
           <template slot-scope="{row}">
@@ -101,7 +114,8 @@
         memberName: '',
         memberCompanyId: '',
         localtionId: '',
-        typeId: '',
+        typeId: null,
+        typeIdPath: null,
         code: '',
         categoryList: []
       },
@@ -125,6 +139,17 @@
     this.search()
   },
   methods: {
+    normalizeOptions(node) {
+      if (node.childList && !node.childList.length) {
+        // 鍘绘帀children=[]鐨刢hildren灞炴��
+        delete node.childList;
+      }
+      return {
+        id: node.idPath,
+        label: node.name,
+        children: node.childList,
+      };
+    },
     handleChangeCategory (value) {
       if (this.searchForm.categoryList && this.searchForm.categoryList.length >= 1) {
         this.searchForm.typeId = this.searchForm.categoryList[this.searchForm.categoryList.length - 1]

--
Gitblit v1.9.3