From 2781142ab67deba83925da706ca26b7f8ea1a759 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期四, 04 九月 2025 15:42:24 +0800
Subject: [PATCH] 审批用户列表改为树形
---
src/views/wel/shemi.vue | 40 ++++++++++++++++++++++++++--------------
1 files changed, 26 insertions(+), 14 deletions(-)
diff --git a/src/views/wel/shemi.vue b/src/views/wel/shemi.vue
index c8605ec..3a48b74 100644
--- a/src/views/wel/shemi.vue
+++ b/src/views/wel/shemi.vue
@@ -1,7 +1,7 @@
<template>
<basic-container>
<div class="norightmenu" v-if="!isSearch">
- <avue-crud :addBtn="false" :option="option" :table-loading="loading" :data="treeData" ref="crud"
+ <avue-crud :addBtn="false" :option="option" :row-style="{height:'20px'}" :cell-style="{padding:'0px'}" :table-loading="loading" :data="treeData" ref="crud"
v-model:search="search" v-model:page="mypage" @current-change="currentChange" @size-change="sizeChange"
@refresh-change="refreshChange" @on-load="onLoad" @tree-load="treeLoad" @row-click="rowClick">
<template #search>
@@ -14,9 +14,9 @@
<el-checkbox value="3" label="鍋忕" />
</el-checkbox-group>
</el-col>
- <el-col :span="4" class="search-data-flex">
+ <el-col :span="6" class="search-data-flex">
<span class="search-data-title">闆剁粍浠跺彿:</span>
- <el-select v-model="searchTreeData.drawingNo" filterable remote reserve-keyword placeholder="闆剁粍浠跺彿"
+ <el-select v-model="searchTreeData.drawingNo" filterable remote reserve-keyword placeholder="杈撳叆鑷冲皯3涓瓧绗﹁繃婊ゆ暟鎹�"
:remote-method="remoteMethod" :loading="searchLoading">
<el-option v-for="item in drawingNoList" :key="item.value" :label="item.label"
:value="item.value" /></el-select>
@@ -27,7 +27,7 @@
end-placeholder="缁撴潫鏃堕棿" :size="size" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
@change="createTimeChange" /><!--:disabled-date="disabledDate" 涓嶉渶瑕佺鐢ㄦ棩鏈�-->
</el-col>
- <el-col :span="6" class="search-data-flex">
+ <el-col :span="4" class="search-data-flex">
<el-button type="primary" @click="searchTree" :loading="treeSearchLoad"><el-icon class="el-icon--right"
style="margin-right: 6px;">
<Search />
@@ -66,7 +66,7 @@
</avue-crud>
</div>
<div class="norightmenu" v-else>
- <avue-crud :addBtn="false" :option="option" :table-loading="loading" :data="treeData" ref="crud"
+ <avue-crud :addBtn="false" :option="option" :row-style="{height:'20px'}" :cell-style="{padding:'0px'}" :table-loading="loading" :data="treeData" ref="crud"
v-model:search="search" v-model:page="mypage" @current-change="currentChange" @size-change="sizeChange"
@refresh-change="refreshChange" @on-load="onLoad" @tree-load="treeLoad" @row-click="rowClick">
<template #search>
@@ -81,7 +81,7 @@
</el-col>
<el-col :span="4" class="search-data-flex">
<span class="search-data-title">闆剁粍浠跺彿:</span>
- <el-select v-model="searchTreeData.drawingNo" filterable remote reserve-keyword placeholder="闆剁粍浠跺彿"
+ <el-select v-model="searchTreeData.drawingNo" filterable remote reserve-keyword placeholder="杈撳叆鑷冲皯3涓瓧绗﹁繃婊ゆ暟鎹�"
:remote-method="remoteMethod" :loading="searchLoading">
<el-option v-for="item in drawingNoList" :key="item.value" :label="item.label"
:value="item.value" /></el-select>
@@ -187,6 +187,7 @@
</template>
<script>
+import debounce from 'lodash/debounce';
import { ElMessage } from 'element-plus';
import TodolistLeft from './components/TodolistLeft.vue';
import TodolistRightTop from './components/TodolistRightTop.vue';
@@ -752,9 +753,20 @@
this.searchTreeData.createTimeEnd = value[1];
},
remoteMethod(query) {
- if (query) {
+ if (query && query.length>2) {
this.searchLoading = true;
- axios({
+ this.getRemote(query);
+ } else {
+ this.drawingNoList = [];
+ }
+ },
+ getRemote: debounce(function(query){
+ //闃叉姈锛岃繖閲岃缃�600姣璇锋眰涓�娆″悗鍙�
+ this.getList(query)
+ },600),
+ async getList(query){
+ this.searchLoading = false;
+ axios({
url: '/blade-mdm/program/node/drawing-no-pick',
method: 'get',
params: { drawingNo: query }
@@ -766,9 +778,6 @@
})
this.drawingNoList = drawingNoList;
});
- } else {
- this.drawingNoList = [];
- }
},
showLockDlg(row){
this.lockForm = row;
@@ -969,8 +978,11 @@
});
},
searchTree() {
- if (this.searchTreeData.programStatus.length == 0) return;
- if (this.searchTreeData.drawingNo == "") return;
+ if (this.searchTreeData.programStatus.length == 0 || this.searchTreeData.drawingNo == ""){
+ this.$message.warning('璇疯緭鍏ョ▼搴忕姸鎬佸拰闆剁粍浠跺彿杩涜鎼滅储');
+ return;
+ }
+
this.treeSearchLoad = true;
this.isSearch = !this.isSearch
this.searchTreeData.status = this.searchTreeData.programStatus.join();
@@ -1481,7 +1493,7 @@
}
.search-data-title {
- font-size: 12px;
+ font-size: 14px;
margin-right: 8px;
display: inline-block;
width: 95px;
--
Gitblit v1.9.3