Quellcode durchsuchen

维修完工和维修照片的展示

zhulizhen1111 vor 4 Jahren
Ursprung
Commit
b91d58402f
3 geänderte Dateien mit 234 neuen und 196 gelöschten Zeilen
  1. 4 1
      src/api/equipmentList.js
  2. 52 17
      src/views/equipment/table/rcwxTable.vue
  3. 178 178
      src/views/room/room4.vue

+ 4 - 1
src/api/equipmentList.js

@@ -33,7 +33,10 @@ export function queryWx({ data, getParams }) {
 export function queryWxzy({ data, getParams }) {
     return httputils.getJson(`/data/sms_wxzy/query`, data, getParams)
 }
-
+//设备设施-维修-查图片
+export function queryWxzyImg({ data, getParams }) {
+    return httputils.getJson(`/data/sms_wxzy/queryImg`, data, getParams)
+}
 // 设备设施-专维
 export function queryZw({ data, getParams }) {
     return httputils.getJson(`/data/sms_zw/query`, data, getParams)

+ 52 - 17
src/views/equipment/table/rcwxTable.vue

@@ -94,7 +94,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>
@@ -104,7 +104,7 @@
                         <div
                             v-if='row.finish_photos_num'
                             style='cursor:pointer;color: #0091ff;'
-                            @click.stop='clickPic(row.finish_photos_num)'
+                            @click.stop='clickPicFinish(row)'
                         >{{row.finish_photos_num+'张'}}</div>
                         <div v-else>{{'--'}}</div>
                     </template>
@@ -126,7 +126,7 @@
     </div>
 </template>
 <script>
-import { queryWxzy } from '@/api/equipmentList.js'
+import { queryWxzy, queryWxzyImg } from '@/api/equipmentList.js'
 import { mapGetters } from 'vuex'
 import inputDialog from './inputDIalog'
 import { Select } from 'meri-design'
@@ -198,7 +198,7 @@ export default {
                 },
             }
             //区分主要设备和全部设备
-            if(this.smsxt != '1008'){
+            if (this.smsxt != '1008') {
                 getParams.data.onlyMainAsset = true
             }
             if (this.assetnum) {
@@ -230,7 +230,7 @@ export default {
             if (this.wonum2) {
                 getParams.data.keyword += `${this.wonum2}:wonum;`
             }
-            if(this.people){
+            if (this.people) {
                 getParams.data.keyword += `${this.people}:lead;`
             }
             if (getParams.data.keyword == '') {
@@ -241,18 +241,53 @@ export default {
                 this.total = res.count
             })
         },
-        clickPic(row) {
-            this.imgUrl = []
-            if (row) {
-                row.forEach((el) => {
-                    let obj = {
-                        name: el.description,
-                        url: el.url,
-                    }
-                    this.imgUrl.push(obj)
-                })
+        clickPicRepair(row) {
+            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)
+                    })
+                }
+                this.$refs.picLargeOpen.open(this.imgUrl)
+            })
+        },
+        clickPicFinish(row) {
+            let getParams = {
+                data: {
+                    plazaId: this.plazaId,
+                    ticketuid: row.ticketuid,
+                    type: 1,
+                    workorderid: row.workorderid,
+                },
             }
-            this.$refs.picLargeOpen.open(this.imgUrl)
+            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)
+            })
         },
         startMethods() {
             this.tabFind()
@@ -272,7 +307,7 @@ export default {
             let data = {
                 plazaId: this.$store.state.plazaId,
             }
-            if(this.smsxt!='1008'){
+            if (this.smsxt != '1008') {
                 data.onlyMainAsset = true
             }
             querySelect({ data, postParams }).then((res) => {

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

@@ -1,195 +1,195 @@
 <template>
-  <div class="compute-item">
-    <div ref="tableBox4" class="compute-table">
-      <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>
-        </el-table-column>
-        <el-table-column prop="matters" label="位置名称" width="240" show-overflow-tooltip resizable>
-          <template slot-scope="{row}">{{row.wzjc || '--'}}</template>
-        </el-table-column>
-        <el-table-column
-          prop="description"
-          label="问题描述"
-          show-overflow-tooltip
-          resizable
-          min-width="340"
-        >
-          <template slot-scope="{row}">{{row.description || '--'}}</template>
-        </el-table-column>
-        <el-table-column
-          prop="description"
-          label="工单编号"
-          show-overflow-tooltip
-          resizable
-          min-width="80"
-        >
-          <template slot-scope="{row}">
-            <div
-              v-if="row.wonum"
-              @click.stop="staff(row)"
-              style="cursor:pointer;color: #0091ff;"
-            >{{row.wonum}}</div>
-            <div v-else>{{'--'}}</div>
-          </template>
-        </el-table-column>
-        <el-table-column
-          prop="description"
-          label="报修来源"
-          show-overflow-tooltip
-          resizable
-          min-width="340"
-        >
-          <template slot-scope="{row}">{{row.bxfwlymc || '--'}}</template>
-        </el-table-column>
-        <el-table-column
-          prop="description"
-          label="执行人"
-          show-overflow-tooltip
-          resizable
-          min-width="80"
-        >
-          <template slot-scope="{row}">{{row.lead || '--'}}</template>
-        </el-table-column>
-        <el-table-column prop="reportdate" label="要求完成时间" width="140">
-          <template slot-scope="{row}">{{row.schedfinish?formatterTime(row.schedfinish): '--'}}</template>
-        </el-table-column>
-        <el-table-column prop="sjjssj" label="实际完工时间" width="140">
-          <template slot-scope="{row}">{{row.wotjyssj?formatterTime(row.wotjyssj): '--'}}</template>
-        </el-table-column>
-        <el-table-column prop="assetnum" label="设备内码" show-overflow-tooltip resizable width="80">
-          <template slot-scope="{row}">{{row.assetnum || '--'}}</template>
-        </el-table-column>
-        <el-table-column
-          prop="description"
-          label="位置内码"
-          show-overflow-tooltip
-          resizable
-          min-width="80"
-        >
-          <template slot-scope="{row}">{{row.location || '--'}}</template>
-        </el-table-column>
-        <el-table-column prop="brand" label="报修照片" width="80">
-          <template slot-scope="{row}">
-            <div
-              v-if="row.repair_photos_num"
-              style="cursor:pointer;color: #0091ff;"
-              @click.stop="clickPic(row.repair_photos_num)"
-            >{{row.repair_photos_num +'张'}}</div>
-            <div v-else>{{'--'}}</div>
-          </template>
-        </el-table-column>
-        <el-table-column prop="brand" label="完工照片" width="80">
-          <template slot-scope="{row}">
-            <div
-              v-if="row.finish_photos_num"
-              style="cursor:pointer;color: #0091ff;"
-              @click.stop="clickPic(row.finish_photos_num)"
-            >{{row.finish_photos_num +'张'}}</div>
-            <div v-else>{{'--'}}</div>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <pic-large ref="picLargeOpen"></pic-large>
+    <div class='compute-item'>
+        <div ref='tableBox4' class='compute-table'>
+            <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>
+                </el-table-column>
+                <el-table-column prop='matters' label='位置名称' width='240' show-overflow-tooltip resizable>
+                    <template slot-scope='{row}'>{{row.wzjc || '--'}}</template>
+                </el-table-column>
+                <el-table-column prop='description' label='问题描述' show-overflow-tooltip resizable min-width='340'>
+                    <template slot-scope='{row}'>{{row.description || '--'}}</template>
+                </el-table-column>
+                <el-table-column prop='description' label='工单编号' show-overflow-tooltip resizable min-width='80'>
+                    <template slot-scope='{row}'>
+                        <div v-if='row.wonum' @click.stop='staff(row)' style='cursor:pointer;color: #0091ff;'>{{row.wonum}}</div>
+                        <div v-else>{{'--'}}</div>
+                    </template>
+                </el-table-column>
+                <el-table-column prop='description' label='报修来源' show-overflow-tooltip resizable min-width='340'>
+                    <template slot-scope='{row}'>{{row.bxfwlymc || '--'}}</template>
+                </el-table-column>
+                <el-table-column prop='description' label='执行人' show-overflow-tooltip resizable min-width='80'>
+                    <template slot-scope='{row}'>{{row.lead || '--'}}</template>
+                </el-table-column>
+                <el-table-column prop='reportdate' label='要求完成时间' width='140'>
+                    <template slot-scope='{row}'>{{row.schedfinish?formatterTime(row.schedfinish): '--'}}</template>
+                </el-table-column>
+                <el-table-column prop='sjjssj' label='实际完工时间' width='140'>
+                    <template slot-scope='{row}'>{{row.wotjyssj?formatterTime(row.wotjyssj): '--'}}</template>
+                </el-table-column>
+                <el-table-column prop='assetnum' label='设备内码' show-overflow-tooltip resizable width='80'>
+                    <template slot-scope='{row}'>{{row.assetnum || '--'}}</template>
+                </el-table-column>
+                <el-table-column prop='description' label='位置内码' show-overflow-tooltip resizable min-width='80'>
+                    <template slot-scope='{row}'>{{row.location || '--'}}</template>
+                </el-table-column>
+                <el-table-column prop='brand' label='报修照片' width='80'>
+                    <template slot-scope='{row}'>
+                        <div
+                            v-if='row.repair_photos_num'
+                            style='cursor:pointer;color: #0091ff;'
+                            @click.stop='clickPicRepair(row)'
+                        >{{row.repair_photos_num +'张'}}</div>
+                        <div v-else>{{'--'}}</div>
+                    </template>
+                </el-table-column>
+                <el-table-column prop='brand' label='完工照片' width='80'>
+                    <template slot-scope='{row}'>
+                        <div
+                            v-if='row.finish_photos_num'
+                            style='cursor:pointer;color: #0091ff;'
+                            @click.stop='clickPicFinish(row)'
+                        >{{row.finish_photos_num +'张'}}</div>
+                        <div v-else>{{'--'}}</div>
+                    </template>
+                </el-table-column>
+            </el-table>
+        </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 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>
-  </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 { 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", "total", "page", "size", "loading"],
-  data() {
-    return {
-      dateVal: "",
-      value1: "",
-      searVal: "",
-      number_format,
-      formatterTime,
-      tableMaxHeight: 0,
-      imgUrl: []
-    };
-  },
-  components: { Select },
-  methods: {
-    indexMethod(index) {
-      return (this.page - 1) * this.size + index + 1;
-    },
-    formatter(date) {
-      return moment.unix(date / 1000).format("YYYY.MM.DD HH:mm");
+    props: ['table4', 'total', 'page', 'size', 'loading'],
+    data() {
+        return {
+            dateVal: '',
+            value1: '',
+            searVal: '',
+            number_format,
+            formatterTime,
+            tableMaxHeight: 0,
+            imgUrl: [],
+        }
     },
-    pageChanged(page) {
-      this.$emit("Index3Emit", page);
+    components: { Select },
+    methods: {
+        indexMethod(index) {
+            return (this.page - 1) * this.size + index + 1
+        },
+        formatter(date) {
+            return moment.unix(date / 1000).format('YYYY.MM.DD HH:mm')
+        },
+        pageChanged(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}`)
+            }
+        },
+        clickPicRepair(row) {
+            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)
+                    })
+                }
+                this.$refs.picLargeOpen.open(this.imgUrl)
+            })
+        },
+        clickPicFinish(row) {
+            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)
+                    })
+                }
+                this.$refs.picLargeOpen.open(this.imgUrl)
+            })
+        },
+        computedHeight() {
+            this.$nextTick(() => {
+                // 页面渲染完成后的回调
+                this.tableMaxHeight = this.$refs.tableBox4.offsetHeight
+            })
+        },
     },
-    //工单详情
-    innerTable(row) {
-      if (row.workorderid) {
-        window.open(
-          `http://gcgl.wanda.cn/maximo/ui/?event=loadapp&value=JXWO&uniqueid=WB_GZGL&uniqueid=${row.wb_gzglid}`
-        );
-      }
+    updated() {
+        this.$nextTick(() => {
+            // 页面渲染完成后的回调
+            this.tableMaxHeight = this.$refs.tableBox4.offsetHeight
+        })
     },
-    clickPic(row) {
-      this.imgUrl = [];
-      if (row) {
-        row.forEach(el => {
-          let obj = {
-            name: el.description,
-            url: el.url
-          };
-          this.imgUrl.push(obj);
-        });
-      }
-      this.$refs.picLargeOpen.open(this.imgUrl);
-    },
-    computedHeight() {
-      this.$nextTick(() => {
-        // 页面渲染完成后的回调
-        this.tableMaxHeight = this.$refs.tableBox4.offsetHeight;
-      });
-    }
-  },
-  updated() {
-    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>