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/workorderShe.vue |   35 ++++++++++++++++++++++++++++++-----
 1 files changed, 30 insertions(+), 5 deletions(-)

diff --git a/admin/src/views/business/workorderShe.vue b/admin/src/views/business/workorderShe.vue
index 4f25d39..2a23867 100644
--- a/admin/src/views/business/workorderShe.vue
+++ b/admin/src/views/business/workorderShe.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>
@@ -56,6 +68,7 @@
             <span v-else>鏈汉</span>
           </template>
         </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="remark" label="鍏蜂綋浣嶇疆" min-width="100px"></el-table-column>
           <el-table-column prop="outJiuyi" label="灏卞尰鎯呭喌" min-width="100px">
@@ -127,7 +140,8 @@
         memberName: '',
         memberCompanyId: '',
         localtionId: '',
-        typeId: '',
+        typeId: null,
+        typeIdPath: null,
         code: '',
         categoryList: []
       },
@@ -151,6 +165,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