From 68e4f07d5312537d4c8b9f8f856265e611e51e14 Mon Sep 17 00:00:00 2001
From: gaoshp <291585735@qq.com>
Date: 星期四, 28 八月 2025 21:01:06 +0800
Subject: [PATCH] 搜索
---
src/views/wel/shemi.vue | 25 +++++++++++++++++++------
1 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/src/views/wel/shemi.vue b/src/views/wel/shemi.vue
index 66c1bcd..c16667e 100644
--- a/src/views/wel/shemi.vue
+++ b/src/views/wel/shemi.vue
@@ -200,7 +200,7 @@
data() {
let rejectText = '椹冲洖';//+this.row.categoryName;
return {
- isSearch: false,
+ isSearch: null,
treeSearchLoad: false,
drawingNoList: [],
searchLoading: false,
@@ -538,7 +538,7 @@
label: '閿佸畾鐘舵��',
prop: 'isLocked',
formatter: (val, value, label) => {
- if (val.nodeType == '60' || val.nodeType == '70') {
+ if (val.nodeType == '60') {
if (value == 1) {
return '宸查攣瀹�';
} else {
@@ -922,7 +922,7 @@
if (this.searchTreeData.programStatus.length == 0) return;
if (this.searchTreeData.drawingNo == "") return;
this.treeSearchLoad = true;
- this.isSearch = true
+ this.isSearch = !this.isSearch
this.searchTreeData.status = this.searchTreeData.programStatus.join();
this.treeData = []
axios({
@@ -930,13 +930,18 @@
method: 'get',
params: this.searchTreeData
}).then(res => {
- this.treeSearchLoad = false;
- if (res.data.data.length == 0) return;
+
+ if (res.data.data.length == 0) {
+ this.treeData = [];
+ this.treeSearchLoad = false;
+ return
+ };
// this.option.defaultExpandAll = true;
let treeData = this.removeHasChildren(res.data.data);
console.log('treeData', treeData)
this.option = Object.assign({},this.option,{defaultExpandedKeys: this.defaultExpandedKeys,lazy: true,defaultExpandAll: true});
setTimeout(() => {
+ this.treeSearchLoad = false;
this.treeData = treeData;
this.$nextTick(() => {
this.highlightTargetRow(); // 璁剧疆褰撳墠琛岄珮浜�
@@ -951,7 +956,7 @@
if (this.treeData.length == 0) {
return;
}
- }, 100);
+ }, 1000);
});
@@ -1279,8 +1284,12 @@
},
treeLoad(tree, treeNode, resolve) {
console.log('tree', tree, treeNode, this.option)
+ if(this.isSearch !== null){
+ return
+ }
this.loading = true;
var obj = { parentId: tree.id }
+
axios({
url: '/blade-mdm/program/node/lazy-list',
method: 'get',
@@ -1302,8 +1311,12 @@
},
onLoad() { //鏌ヨtreeTable
+ if(this.isSearch !== null){
+ return
+ }
this.loading = true;
var obj = { parentId: "" }
+
axios({
url: '/blade-mdm/program/node/lazy-list',
method: 'get',
--
Gitblit v1.9.3