YaolongHan 4 tahun lalu
induk
melakukan
06b9a4d97a
2 mengubah file dengan 52 tambahan dan 20 penghapusan
  1. 1 1
      src/api/equipmentList.js
  2. 51 19
      src/views/room/index.vue

+ 1 - 1
src/api/equipmentList.js

@@ -31,7 +31,7 @@ export function queryWx({ data, getParams }) {
 }
 // 设备设施-维修专业事项
 export function queryWxzy({ data, getParams }) {
-    return httputils.getJson(`/data/sms_wxzy/query`, data, getParams)
+    return httputils.fetchJson(`/data/sms_wxzy/query`, data, getParams)
 }
 //设备设施-维修-查图片
 export function queryWxzyImg({ data, getParams }) {

+ 51 - 19
src/views/room/index.vue

@@ -343,11 +343,13 @@
               ></el-input>
               <Select
                 @change="Index3Emit(1)"
+                @confirm="confirmMore"
                 style="margin-right:12px;"
                 v-model="statue"
-                width="180"
+                width="200"
                 tipPlace="top"
                 caption="任务状态描述:"
+                multiple
                 :selectdata="statusOption"
               ></Select>
               <Select
@@ -400,8 +402,8 @@
                       prefix-icon="el-icon-search"
                       v-model="inputForm.locationName"
                       style="width:232px;margin-right:12px"
-                    ></el-input> -->
-                       <p style="margin:16px 0 8px 0">搜索执行人</p>
+                    ></el-input>-->
+                    <p style="margin:16px 0 8px 0">搜索执行人</p>
                     <el-input
                       placeholder="搜索执行人"
                       size="small"
@@ -555,7 +557,17 @@ export default {
       },
       sjjssj: "",
       real: "",
-      statue: "全部",
+      statue: [],
+      getStatue: [
+        "新建",
+        "待派工",
+        "已派工",
+        "待验收",
+        "验收通过",
+        "工单执行退回",
+        "问题待解决",
+        "执行中"
+      ], //默认选项如果statusOption存在则写入statue中
       wzjc: "",
       statusOption: []
     };
@@ -581,12 +593,11 @@ export default {
         this.Index2();
         this.$refs.roomTable3.computedHeight();
       } else if (tab.label == "核心设备日常维修") {
-        this.Index3();
+        // this.Index3();
         this.$refs.roomTable4.computedHeight();
-        this.changeSelect();
+        this.changeSelect("核心设备日常维修");
       } else if (tab.label == "核心设备日常维保") {
-        this.Index4Emit(1);
-        this.changeSelect();
+        this.changeSelect("核心设备日常维保");
         this.$refs.roomTable5.computedHeight();
       }
     },
@@ -732,6 +743,14 @@ export default {
       this.page3 = val;
       this.Index3();
     },
+    confirmMore(val) {
+      const arr = [];
+      val.forEach(item => {
+        arr.push(item.id);
+      });
+      this.statue = arr;
+      this.Index3Emit(1);
+    },
     Index4Emit(val) {
       this.page4 = val;
       this.Index4();
@@ -769,9 +788,9 @@ export default {
         // getParams.data.bxfwlymc = this.source;
         getParams.data.bxfwly = this.source;
       }
-      if (this.statue && this.statue != "全部") {
-        getParams.data.status = this.statue;
-      }
+      //   if (this.statue && this.statue != "全部") {
+      //     getParams.data.status = this.statue;
+      //   }
 
       //输入框搜索
       getParams.data.keyword = "";
@@ -796,7 +815,10 @@ export default {
       if (getParams.data.keyword == "") {
         delete getParams.data.keyword;
       }
-      queryWxzy(getParams).then(res => {
+      const data = {
+          status:this.statue
+      }
+      queryWxzy(data,getParams).then(res => {
         this.loading4 = false;
         this.total3 = res.count;
         this.table4 = res.data ? res.data : [];
@@ -894,7 +916,7 @@ export default {
       this.Index4Emit(1);
     },
     // 下拉框数据
-    changeSelect() {
+    changeSelect(val) {
       // 1保修来源
       let postParams = [
         {
@@ -940,22 +962,33 @@ export default {
         }
       ];
       querySelect({ data, postParams: postParams2 }).then(res => {
-        console.log("resrfes", res);
         let bxfwlymc =
           res.data && res.data.data && res.data.data.sms_wxzy
             ? res.data.data.sms_wxzy.status
             : [];
         this.statusOption = [];
-        this.statusOption.push({
-          name: "全部",
-          id: "全部"
-        });
+        // this.statusOption.push({
+        //   name: "全部",
+        //   id: "全部"
+        // });
         bxfwlymc.forEach(el => {
           this.statusOption.push({
             name: el.value,
             id: el.key
           });
         });
+        let statue = [];
+        this.statusOption.forEach(item => {
+          if (this.getStatue.includes(item.id)) {
+            statue.push(item.id);
+          }
+        });
+        this.statue = statue;
+        if (val == "核心设备日常维修") {
+          this.Index3Emit(1);
+        } else {
+          this.Index4Emit(1);
+        }
       });
       // 2维保任务状态
       let postParams3 = [
@@ -968,7 +1001,6 @@ export default {
         }
       ];
       querySelect({ data, postParams: postParams3 }).then(res => {
-        console.log("resrfes", res);
         let status =
           res.data && res.data.data && res.data.data.sms_wbzy
             ? res.data.data.sms_wbzy.status