|
@@ -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>
|