From 93a38ac31615b1aa053a4440c59814ea72353945 Mon Sep 17 00:00:00 2001
From: Surpriseplus <845948745@qq.com>
Date: 星期二, 17 一月 2023 14:39:19 +0800
Subject: [PATCH] 界面修改

---
 src/views/datamanage/SpatialData.vue |   35 +++++++++++++++++++++++++++--------
 1 files changed, 27 insertions(+), 8 deletions(-)

diff --git a/src/views/datamanage/SpatialData.vue b/src/views/datamanage/SpatialData.vue
index eef189b..757d7f1 100644
--- a/src/views/datamanage/SpatialData.vue
+++ b/src/views/datamanage/SpatialData.vue
@@ -7,15 +7,18 @@
     <el-divider />
     <div class="spatialContent">
       <div class="spatial_leftTree">
+        <el-input v-model="filterText"></el-input>
         <div style="width:300px">
+
           <el-tree
-            ref="treeDay"
             :data="tree"
             :props="defaultProps"
             :default-expanded-keys="[1]"
             node-key="id"
             :current-node-key="10"
             @node-click="handleNodeClick"
+            :filter-node-method="filterNode"
+            ref="tree"
           ></el-tree>
         </div>
       </div>
@@ -41,15 +44,15 @@
           <el-form-item>
             <el-button
               @click="conditionVisible = true"
-              class="primaries"
               size="small"
               icon="el-icon-plus"
+              type="success"
             >{{$t('common.append')}}</el-button>
           </el-form-item>
           <el-form-item>
             <el-button
               @click="submitForm"
-              class="primaries"
+              type="primary"
               size="small"
               icon="el-icon-search"
             >{{$t('common.iquery')}}</el-button>
@@ -59,13 +62,14 @@
               @click="resetForm"
               size="small"
               icon="el-icon-refresh"
+              type="info"
             >{{$t('common.reset')}}</el-button>
           </el-form-item>
           <el-form-item>
             <el-button
               @click="getSpaceMapVisibale"
               size="small"
-              class="primaries"
+                type="primary"
             >{{
               $t('synthesis.rangequery')
             }}</el-button>
@@ -454,7 +458,8 @@
       upAttach: {
         tabName: null,
         eventid: null,
-      }
+      },
+      filterText: ''
 
     };
   },
@@ -464,8 +469,17 @@
     this.showPermsBtn();
     this.getTreeDataAll();
   },
-  methods: {
+  watch: {
+    filterText(val) {
+      this.$refs.tree.filter(val);
+    }
+  },
 
+  methods: {
+    filterNode(value, data) {
+      if (!value) return true;
+      return data.label.indexOf(value) !== -1;
+    },
     getSpaceMapVisibale() {
       this.dialogMapVisible = true;
       this.showMapVisible = true;
@@ -507,7 +521,11 @@
       var token = getToken();
       var fs = document.getElementById("insertFile");
       if (fs.files.length == 0) {
-        alert("璇烽�夋嫨瑕佷笂浼犵殑鏂囦欢锛�");
+
+        this.$message({
+          message: '璇烽�夋嫨瑕佷笂浼犵殑鏂囦欢锛�',
+          type: 'warning'
+        });
         return;
       }
       const formData = new FormData()
@@ -581,7 +599,8 @@
       for (var i in option) {
         var val_Data = option[i];
         val_Data.id = '1' + i;
-        val_Data.label = val_Data.tabDesc + "(" + val_Data.tab + ")"
+        // val_Data.label = val_Data.tabDesc + "(" + val_Data.tab + ")"
+        val_Data.label = val_Data.tabDesc
         option[i].id = parseInt(option[i].id)
         if (option[i].ns == 'bd') {
 

--
Gitblit v1.9.3