YaolongHan 4 years ago
parent
commit
208600db58
3 changed files with 94 additions and 92 deletions
  1. 2 2
      src/views/equipment/table/rcwxTable.vue
  2. 1 1
      src/views/room/index.vue
  3. 91 89
      src/views/room/room4.vue

+ 2 - 2
src/views/equipment/table/rcwxTable.vue

@@ -146,7 +146,7 @@
             <div
               v-if="row.repair_photos_num"
               style="cursor:pointer;color: #0091ff;"
-              @click.stop="clickPic(row.repair_photos_num)"
+             @click.stop='clickPic(row)'
             >{{row.repair_photos_num+'张'}}</div>
             <div v-else>{{'--'}}</div>
           </template>
@@ -156,7 +156,7 @@
             <div
               v-if="row.finish_photos_num"
               style="cursor:pointer;color: #0091ff;"
-              @click.stop="clickPic(row.finish_photos_num)"
+              @click.stop='clickPic(row)'
             >{{row.finish_photos_num+'张'}}</div>
             <div v-else>{{'--'}}</div>
           </template>

+ 1 - 1
src/views/room/index.vue

@@ -330,7 +330,7 @@
                 style="width:192px;margin-right:12px"
               ></el-input>
                  <Select
-        @change="getList"
+        @change="Index3"
         style="margin-right:12px;"
         v-model="statue"
         width="180"

+ 91 - 89
src/views/room/room4.vue

@@ -84,7 +84,7 @@
             <div
               v-if="row.repair_photos_num"
               style="cursor:pointer;color: #0091ff;"
-              @click.stop="clickPic(row.repair_photos_num)"
+              @click.stop="clickPicRepair(row)"
             >{{row.repair_photos_num +'张'}}</div>
             <div v-else>{{'--'}}</div>
           </template>
@@ -94,7 +94,7 @@
             <div
               v-if="row.finish_photos_num"
               style="cursor:pointer;color: #0091ff;"
-              @click.stop="clickPic(row.finish_photos_num)"
+              @click.stop="clickPicRepair(row)"
             >{{row.finish_photos_num +'张'}}</div>
             <div v-else>{{'--'}}</div>
           </template>
@@ -103,26 +103,26 @@
     </div>
     <pic-large ref="picLargeOpen"></pic-large>
 
-        <div class='foot'>
-            <el-pagination
-                background
-                layout='prev, pager, next'
-                :total='total'
-                :page-size='size'
-                :current-page.sync='page'
-                @prev-click='pageChanged'
-                @next-click='pageChanged'
-                @current-change='pageChanged'
-            ></el-pagination>
-        </div>
+    <div class="foot">
+      <el-pagination
+        background
+        layout="prev, pager, next"
+        :total="total"
+        :page-size="size"
+        :current-page.sync="page"
+        @prev-click="pageChanged"
+        @next-click="pageChanged"
+        @current-change="pageChanged"
+      ></el-pagination>
     </div>
+  </div>
 </template>
 <script>
 // import Select from '@/components/Select/Select.vue'
-import { Select } from 'meri-design'
-import moment from 'moment'
-import { formatterTime, number_format } from '@/utils/format.js'
-import { queryWxzyImg } from '@/api/equipmentList.js'
+import { Select } from "meri-design";
+import moment from "moment";
+import { formatterTime, number_format } from "@/utils/format.js";
+import { queryWxzyImg } from "@/api/equipmentList.js";
 export default {
   props: ["table4", "sjjssj", "total", "page", "size", "loading"],
   data() {
@@ -139,100 +139,102 @@ export default {
   components: { Select },
   methods: {
     indexMethod(index) {
-        return (this.page - 1) * this.size + index + 1
+      return (this.page - 1) * this.size + index + 1;
     },
     formatter(date) {
-        return moment.unix(date / 1000).format('YYYY.MM.DD HH:mm')
+      return moment.unix(date / 1000).format("YYYY.MM.DD HH:mm");
     },
     pageChanged(page) {
-        this.$emit('Index3Emit', page)
+      this.$emit("Index3Emit", page);
     },
     //工单详情
     innerTable(row) {
-        if (row.workorderid) {
-            window.open(`http://gcgl.wanda.cn/maximo/ui/?event=loadapp&value=JXWO&uniqueid=WB_GZGL&uniqueid=${row.wb_gzglid}`)
-        }
+      if (row.workorderid) {
+        window.open(
+          `http://gcgl.wanda.cn/maximo/ui/?event=loadapp&value=JXWO&uniqueid=WB_GZGL&uniqueid=${row.wb_gzglid}`
+        );
+      }
     },
     clickPicRepair(row) {
-        let getParams = {
-            data: {
-                plazaId: this.$store.state.plazaId,
-                ticketuid: row.ticketuid,
-                type: 0,
-                workorderid: row.workorderid,
-            },
+      let getParams = {
+        data: {
+          plazaId: this.$store.state.plazaId,
+          ticketuid: row.ticketuid,
+          type: 0,
+          workorderid: row.workorderid
+        }
+      };
+      queryWxzyImg(getParams).then(res => {
+        let url = res.data;
+        this.imgUrl = [];
+        if (url) {
+          url.forEach(el => {
+            let obj = {
+              name: el.description,
+              url: el.urlname
+            };
+            this.imgUrl.push(obj);
+          });
         }
-        queryWxzyImg(getParams).then((res) => {
-            let url = res.data
-            this.imgUrl = []
-            if (url) {
-                url.forEach((el) => {
-                    let obj = {
-                        name: el.description,
-                        url: el.urlname,
-                    }
-                    this.imgUrl.push(obj)
-                })
-            }
-            this.$refs.picLargeOpen.open(this.imgUrl)
-        })
+        this.$refs.picLargeOpen.open(this.imgUrl);
+      });
     },
     clickPicFinish(row) {
-        let getParams = {
-            data: {
-                plazaId: this.$store.state.plazaId,
-                ticketuid: row.ticketuid,
-                type: 1,
-                workorderid: row.workorderid,
-            },
+      let getParams = {
+        data: {
+          plazaId: this.$store.state.plazaId,
+          ticketuid: row.ticketuid,
+          type: 1,
+          workorderid: row.workorderid
+        }
+      };
+      queryWxzyImg(getParams).then(res => {
+        let url = res.data;
+        this.imgUrl = [];
+        if (url) {
+          url.forEach(el => {
+            let obj = {
+              name: el.description,
+              url: el.urlname
+            };
+            this.imgUrl.push(obj);
+          });
         }
-        queryWxzyImg(getParams).then((res) => {
-            let url = res.data
-            this.imgUrl = []
-            if (url) {
-                url.forEach((el) => {
-                    let obj = {
-                        name: el.description,
-                        url: el.urlname,
-                    }
-                    this.imgUrl.push(obj)
-                })
-            }
-            this.$refs.picLargeOpen.open(this.imgUrl)
-        })
+        this.$refs.picLargeOpen.open(this.imgUrl);
+      });
     },
     computedHeight() {
-        this.$nextTick(() => {
-            // 页面渲染完成后的回调
-            this.tableMaxHeight = this.$refs.tableBox4.offsetHeight
-        })
+      this.$nextTick(() => {
+        // 页面渲染完成后的回调
+        this.tableMaxHeight = this.$refs.tableBox4.offsetHeight;
+      });
     }
   },
   updated() {
-        this.$nextTick(() => {
-            // 页面渲染完成后的回调
-            this.tableMaxHeight = this.$refs.tableBox4.offsetHeight
-        })
+    this.$nextTick(() => {
+      // 页面渲染完成后的回调
+      this.tableMaxHeight = this.$refs.tableBox4.offsetHeight;
+    });
   }
-}
+};
 </script>
 <style lang="less" scoped>
 </style>
 <style lang="less">
 .compute-item {
-    .compute-center {
-        display: flex;
-        align-items: center;
-        margin-bottom: 12px;
-    }
-    .foot {
-        height: 32px;
-        display: flex;
-        justify-content: flex-end;
-        margin-top: 28px;
-    }
-    /deep/.el-table td {
-        cursor: pointer;
-    }
+  .compute-center {
+    display: flex;
+    align-items: center;
+    margin-bottom: 12px;
+  }
+  .foot {
+    height: 32px;
+    display: flex;
+    justify-content: flex-end;
+    margin-top: 28px;
+  }
+  /deep/.el-table td {
+    cursor: pointer;
+  }
 }
 </style>