Quellcode durchsuchen

解决设备维修bug

YaolongHan vor 4 Jahren
Ursprung
Commit
b2d27bd7fa
2 geänderte Dateien mit 70 neuen und 104 gelöschten Zeilen
  1. 67 101
      src/views/room/index.vue
  2. 3 3
      src/views/room/room4.vue

+ 67 - 101
src/views/room/index.vue

@@ -143,60 +143,6 @@
           </el-tab-pane>
           <el-tab-pane label="核心设备日常维修" name="4">
             <div class="compute-center">
-              <!-- <el-input
-                                clearable
-                                @keyup.enter.native='Index3'
-                                @blur='Index3'
-                                placeholder='搜索设备名称编号'
-                                size='small'
-                                prefix-icon='el-icon-search'
-                                v-model='sbmcInput4'
-                                style='width:200px;margin-right:12px'
-                            ></el-input>
-                            <el-input
-                                clearable
-                                @keyup.enter.native='Index3'
-                                @blur='Index3'
-                                placeholder='搜索事项类型事项描述'
-                                size='small'
-                                prefix-icon='el-icon-search'
-                                v-model='zysxInput4'
-                                style='width:200px;margin-right:12px'
-                            ></el-input>
-                            <Select
-                                @change='Index3'
-                                width='200'
-                                tipPlace='top'
-                                caption='是否更换:'
-                                v-model='sfghSelect'
-                                :selectdata='isReplaceData'
-                                :placeholder='"请选择"'
-                                style='margin-right:12px'
-                            ></Select>
-                            <el-input
-                                clearable
-                                @keyup.enter.native='Index3'
-                                @blur='Index3'
-                                placeholder='搜索工单编号'
-                                size='small'
-                                prefix-icon='el-icon-search'
-                                v-model='gdbhInput4'
-                                style='width:200px;margin-right:12px'
-                            ></el-input>
-                            <div class='picker-box'>
-                                <span class='picker-span'>填报日期:</span>
-                                <el-date-picker
-                                    style='width:190px'
-                                    v-model='tbsjDate'
-                                    value-format='yyyyMMdd'
-                                    type='daterange'
-                                    @change='Index3'
-                                    size='mini'
-                                    range-separator='-'
-                                    start-placeholder
-                                    end-placeholder
-                                ></el-date-picker>
-              </div>-->
               <el-input
                 placeholder="搜索设备名称编号"
                 size="small"
@@ -234,7 +180,7 @@
                 width="180"
                 tipPlace="top"
                 caption="报修来源:"
-                :selectdata="sourceOption"
+                :selectdata="allArr"
               ></Select>
               <el-input
                 placeholder="搜索执行人"
@@ -254,41 +200,45 @@
                   筛选
                 </div>
                 <div class="input-dialog-form" v-if="dialogFormVisible">
-                  <p class="input-dialog-p">验收日期</p>
-                  <p class="input-dialog-p2">
+                  <el-form style=" padding: 20px 24px;">
+                    <p style="margin:16px 0 8px 0">要求完成日期</p>
                     <el-date-picker
                       clearable
-                      v-model="yssjDate"
+                      style="width:232px"
+                      v-model="inputForm.reportdate"
                       value-format="yyyyMMdd"
                       type="daterange"
-                      size="mini"
-                      style="margin-right:12px;width:200px"
+                      size="small"
                       range-separator="-"
                       start-placeholder
                       end-placeholder
                     ></el-date-picker>
-                  </p>
-
-                  <!-- <p class='input-dialog-p'>工单编号</p>
-                                    <p class='input-dialog-p2'>
-                                        <el-input
-                                            clearable
-                                            placeholder
-                                            style='width:200px;'
-                                            size='mini'
-                                            prefix-icon='el-icon-search'
-                                            v-model='gdbhInput4'
-                                        ></el-input>
-                  </p>-->
-                  <p class="input-dialog-foot">
-                    <el-button @click="dialogFormVisible = false" size="mini">取 消</el-button>
-                    <el-button
-                      type="primary"
-                      @click="confirm
-                                        "
-                      size="mini"
-                    >确 定</el-button>
-                  </p>
+                    <p style="margin:16px 0 8px 0">实际完工日期</p>
+                    <el-date-picker
+                      clearable
+                      style="width:232px"
+                      v-model="inputForm.real"
+                      value-format="yyyyMMdd"
+                      type="daterange"
+                      size="small"
+                      range-separator="-"
+                      start-placeholder
+                      end-placeholder
+                    ></el-date-picker>
+                    <p style="margin:16px 0 8px 0">位置名称编号</p>
+                    <el-input
+                      placeholder="搜索位置名称编号"
+                      size="small"
+                      clearable
+                      prefix-icon="el-icon-search"
+                      v-model="inputForm.locationName"
+                      style="width:232px;margin-right:12px"
+                    ></el-input>
+                  </el-form>
+                  <div style="position:absolute;bottom:24px;right:24px;z-index:9999">
+                    <el-button @click="dialogFormVisible = false" size="small">取 消</el-button>
+                    <el-button type="primary" @click="confirm" size="small">确 定</el-button>
+                  </div>
                 </div>
               </div>
             </div>
@@ -300,6 +250,7 @@
               :page="page3"
               :total="total3"
               :size="size3"
+              :sjjssj="sjjssj"
               @Index3Emit="Index3Emit"
             ></room-table4>
           </el-tab-pane>
@@ -516,12 +467,6 @@ export default {
       cxggInput: "",
       djbhInput: "",
       kzhlInput: "",
-      allArr: [
-        {
-          id: "全部",
-          name: "全部"
-        }
-      ],
       //
       total2: 0,
       page2: 1,
@@ -578,7 +523,14 @@ export default {
       ycgdtbsj: "",
       ycgdyssj: "",
       smsxtArr: {},
-      type: ""
+      type: "",
+      inputForm: {
+        reportdate: "",
+        real: "",
+        locationName: ""
+      },
+      sjjssj:'',
+      real:''
     };
   },
   components: {
@@ -767,6 +719,9 @@ export default {
           size: this.size3
         }
       };
+      if (this.smsxtArr.smsxt != "1008") {
+        getParams.data.onlyMainAsset = true;
+      }
       //////////待定
       //   if (this.assetnum) {
       //     getParams.data.assetnum = this.assetnum;
@@ -774,14 +729,14 @@ export default {
 
       //下拉
       // 监听下拉框
-      //   if (this.reportdate) {
-      //     getParams.data.schedfinishStartDate = this.reportdate[0] + "000000";
-      //     getParams.data.schedfinishEndDate = this.reportdate[1] + "000000";
-      //   }
-      //   if (this.real) {
-      //     getParams.data.wotjyssjStartDate = this.real[0] + "000000";
-      //     getParams.data.wotjyssjEndDate = this.real[1] + "000000";
-      //   }
+        if (this.reportdate) {
+          getParams.data.schedfinishStartDate = this.reportdate[0] + "000000";
+          getParams.data.schedfinishEndDate = this.reportdate[1] + "000000";
+        }
+        if (this.real) {
+          getParams.data.wotjyssjStartDate = this.real[0] + "000000";
+          getParams.data.wotjyssjEndDate = this.real[1] + "000000";
+        }
       if (this.source && this.source != "全部") {
         getParams.data.bxfwlymc = this.source;
       }
@@ -791,17 +746,24 @@ export default {
         getParams.data.keyword += `${this.sbjc}:sbmc,assetnum;`;
       }
       if (this.matters) {
-        getParams.data.keyword += `${this.matters}:description,matters;`;
+        getParams.data.keyword += `${this.matters}:description;`;
       }
       if (this.locationName) {
         getParams.data.keyword += `${this.locationName}:location`;
       }
+      if (this.wonum2) {
+        getParams.data.keyword += `${this.wonum2}:wonum;`;
+      }
+      if (this.people) {
+        getParams.data.keyword += `${this.people}:lead;`;
+      }
       if (getParams.data.keyword == "") {
         delete getParams.data.keyword;
       }
       queryWxzy(getParams).then(res => {
-        this.tableData = res.data || [];
-        this.total = res.count;
+        this.loading4 = false;
+        this.total3 = res.count;
+        this.table4 = res.data ? res.data : [];
       });
     },
     // 机房维保记录
@@ -885,7 +847,11 @@ export default {
       });
     },
     confirm() {
-      this.Index3();
+        this.reportdate = this.inputForm.reportdate;
+        this.sjjssj = this.inputForm.real;
+        this.real = this.inputForm.real;
+        this.locationName = this.inputForm.locationName;
+        this.Index3();
     },
     confirm2() {
       this.Index4();

+ 3 - 3
src/views/room/room4.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="compute-item">
     <div ref="tableBox4" class="compute-table">
-      <el-table :data="tableData" :border="true" style="width: 100%" @row-click="innerTable">
+      <el-table :data="table4" :border="true" style="width: 100%" @row-click="innerTable">
         <el-table-column type="index" label="序号" width="60" :index="indexMethod"></el-table-column>
         <el-table-column prop="sbmc" label="设备名称" show-overflow-tooltip resizable min-width="100">
           <template slot-scope="{row}">{{row.sbmc || '--'}}</template>
@@ -112,8 +112,7 @@
 // import Select from '@/components/Select/Select.vue'
 import { Select } from "meri-design";
 import moment from "moment";
-import { number_format } from "@/utils/format.js";
-
+import { formatterTime,number_format } from "@/utils/format.js";
 export default {
   props: ["table4", "total", "page", "size", "loading"],
   data() {
@@ -122,6 +121,7 @@ export default {
       value1: "",
       searVal: "",
       number_format,
+      formatterTime,
       tableMaxHeight: 0,
       imgUrl: []
     };