likang 3 anos atrás
pai
commit
247f7e3db0
1 arquivos alterados com 74 adições e 20 exclusões
  1. 74 20
      src/views/wind/worklocation/index.vue

+ 74 - 20
src/views/wind/worklocation/index.vue

@@ -17,13 +17,24 @@
           ></el-cascader>
         </div>
         <div class="search-item">
-          <el-input
-            v-model="queryParam.fan_id"
-            placeholder="风场"
+          <el-select
+            v-model="queryParam.wind_id"
+            placeholder="请输入风场关键词"
+            filterable
+            remote
             clearable
+            :remote-method="remoteMethod"
+            :loading="loading"
             class="filter-item form-search-input fl"
-            @keyup.enter.native="handleSearch"
-          />
+          >
+             <el-option
+                v-for="item in windoptions"
+                :key="item.value"
+                :label="item.text"
+                :value="item.value">
+              </el-option>
+          </el-select>
+          
         </div>
          <div class="search-item">
           <el-input  
@@ -51,9 +62,9 @@
                   class="filter-item form-search-input fl"
                   clearable
                 >
-             <el-option v-for="item in deviceModels" 
+             <el-option v-for="item in work_local_options" 
              :key="item.value" 
-             :label="item.text" 
+             :label="item.name" 
              :value="item.value"></el-option>
           </el-select>
         </div>
@@ -65,9 +76,9 @@
                   class="filter-item form-search-input fl"
                   clearable
                 >
-             <el-option v-for="item in deviceModels" 
+             <el-option v-for="item in parts_options" 
              :key="item.value" 
-             :label="item.text" 
+             :label="item.name" 
              :value="item.value"></el-option>
           </el-select>
           </div>
@@ -79,9 +90,9 @@
                   class="filter-item form-search-input fl"
                   clearable
                 >
-             <el-option v-for="item in deviceModels" 
+             <el-option v-for="item in bolt_style_options" 
              :key="item.value" 
-             :label="item.text" 
+             :label="item.name" 
              :value="item.value"></el-option>
           </el-select>
           </div>
@@ -93,9 +104,9 @@
                   class="filter-item form-search-input fl"
                   clearable
                 >
-             <el-option v-for="item in deviceModels" 
+             <el-option v-for="item in bolt_type_options" 
              :key="item.value" 
-             :label="item.text" 
+             :label="item.name" 
              :value="item.value"></el-option>
           </el-select>
           </div>
@@ -355,14 +366,30 @@ export default {
   data() {
     return {
       url: "worklocation",
+      loading:false,
+      windoptions:[],
+      //工作位置
+      work_local_options:[],
+      //所属部件
+      parts_options:[],
+      //螺栓样式
+      bolt_style_options:[],
+      //螺栓型号
+      bolt_type_options:[],
+
       queryParam: {
         number: "",
         department_id: [],
+        fan_number:'',
+        work_local:'',
+        parts:'',
         //风场的id
-        fan_id:"",
-        name: "",
-        model: "",
-        is_used: "",
+        wind_id:"",
+        bolt_style:'',
+        bolt_type:'',
+        //时间
+        time: "",
+      
       },
       defaultQueryParam:['type'],
       current_type: {
@@ -405,9 +432,20 @@ export default {
     this.$http.get("departments").then((response) => {
       this.departments = response.data;
     });
-     this.$http.get("get_device_mold",{ params: {type:2} }).then(resp => {
-        this.deviceModels = resp.data
-     });
+     this.$http.get("get_mainten_option?type="+"2").then((response) => {
+      this.work_local_options = response.data;
+    });
+     this.$http.get("get_mainten_option?type="+"1").then((response) => {
+      this.parts_options = response.data;
+    });
+    this.$http.get("get_mainten_option?type="+"3").then((response) => {
+      this.bolt_style_options = response.data;
+    });
+     this.$http.get("get_mainten_option?type="+"4").then((response) => {
+      this.bolt_type_options = response.data;
+    });
+
+    
 
   },
   methods: {
@@ -426,6 +464,22 @@ export default {
       this.queryParam.page = this.paginate.current;
       this.getList();
     },
+    //风场模糊查询
+    remoteMethod(query)
+    {
+        this.loading=true;
+        if(query!=='')
+        {
+           this.$http.get("wind/getWindOptions?name="+query).then((response) => {
+               this.windoptions = response.data;
+           });
+        }
+        else
+        {
+          this.windoptions=[];
+        }
+        this.loading=false
+    },
     searchDis() {
       this.searchDisplay = !this.searchDisplay;
       var searchBoxHeght = document.getElementById("searchBox");