From 16332a341801f80d27830d2ea4e683b4ab21167c Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期一, 21 四月 2025 18:28:00 +0800
Subject: [PATCH] 工单业务
---
admin/src/views/business/workorderShe.vue | 49 +++++++++++++++++++++++++++++++++++++------------
1 files changed, 37 insertions(+), 12 deletions(-)
diff --git a/admin/src/views/business/workorderShe.vue b/admin/src/views/business/workorderShe.vue
index dc3fe97..7b7e7e8 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> <!– 鑷畾涔夋樉绀哄唴瀹� –>
</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>
@@ -40,12 +52,12 @@
<span style="color: #2E68EC;cursor: pointer" @click="$refs.operaWorkorderWindow.open('SHE浜嬩欢宸ュ崟璇︽儏', row)" >{{ row.code || '-'}}</span>
</template>
</el-table-column>
- <el-table-column prop="typeName" label="浼ゅ绫诲瀷" min-width="100px"></el-table-column>
+ <el-table-column prop="typeNamePath" label="浼ゅ绫诲瀷" min-width="100px"></el-table-column>
<el-table-column prop="submitDate" label="涓婃姤鏃堕棿" min-width="150px"></el-table-column>
<el-table-column prop="status" label="鐘舵��" min-width="100px">
<template slot-scope="{row}">
- <span :class="'statusInfo'+row.status" v-if="row.status ==0">寰呭鐞�</span>
- <span :class="'statusInfo'+row.status" v-else-if="row.status ==3 ||row.status ==4||row.status ==5">宸插鐞�</span>
+ <!-- <span :class="'statusInfo'+row.status" v-if="row.status ==0">寰呭鐞�</span>-->
+ <span :class="'statusInfo'+row.status" v-if="row.status ==3 ||row.status ==4||row.status ==5">宸插鐞�</span>
<span :class="'statusInfo'+row.status" v-else>澶勭悊涓�</span>
</template>
</el-table-column>
@@ -56,7 +68,8 @@
<span v-else>鏈汉</span>
</template>
</el-table-column>
- <el-table-column prop="locationName" label="鍙戠敓鍦扮偣" min-width="100px"></el-table-column>
+ <el-table-column prop="happenTime" label="鍙戠幇鏃堕棿" min-width="150px"></el-table-column>
+ <el-table-column prop="locationName" label="鍙戠敓鍦扮偣" min-width="200px"></el-table-column>
<el-table-column prop="remark" label="鍏蜂綋浣嶇疆" min-width="100px"></el-table-column>
<el-table-column prop="outJiuyi" label="灏卞尰鎯呭喌" min-width="100px">
<template slot-scope="{row}">
@@ -76,14 +89,14 @@
<span v-else>鍚�</span>
</template>
</el-table-column>
- <el-table-column prop="eventInfo" label="浜嬩欢璇存槑" min-width="100px"></el-table-column>
- <el-table-column prop="memberName" label="涓婃姤浜哄憳" min-width="100px">
+ <el-table-column prop="eventInfo" label="浜嬩欢璇存槑" min-width="200px"></el-table-column>
+ <el-table-column prop="memberName" label="涓婃姤浜哄憳" min-width="150px">
<template slot-scope="{row}">
<span v-if="row.memberPhone" >{{row.memberName}} - {{row.memberPhone }}</span>
<span v-else >{{row.memberName}} </span>
</template>
</el-table-column>
- <el-table-column prop="companyName" label="鎵�灞為儴闂�" min-width="100px"></el-table-column>
+ <el-table-column prop="companyName" label="鎵�灞為儴闂�" min-width="150px"></el-table-column>
<el-table-column prop="createDate" label="鎻愪氦鏃堕棿" min-width="150px"></el-table-column>
<el-table-column
v-if="containPermissions(['business:workorder:update', 'business:workorder:delete'])"
@@ -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