|
@@ -1,166 +1,176 @@
|
|
|
<template>
|
|
|
- <div class='compute-item'>
|
|
|
- <div ref='tableBox4' class='compute-table'>
|
|
|
- <el-table
|
|
|
- :border='true'
|
|
|
- v-loading='loading'
|
|
|
- :max-height='tableMaxHeight'
|
|
|
- :data='table4'
|
|
|
- style='width: 100%'
|
|
|
- @row-click='innerTable'
|
|
|
- :header-cell-style='{background:"rgba(245,246,247,1)",fontFamily:"MicrosoftYaHei",color:"rgba(100,108,115,1)",lineHeight:"16px",fontSize:"12px"}'
|
|
|
- >
|
|
|
- <el-table-column type='index' label='序号' width='60' :index='indexMethod'></el-table-column>
|
|
|
- <el-table-column prop label='设备名称' show-overflow-tooltip resizable min-width='360'>
|
|
|
- <template slot-scope='{row}'>{{row.sbmc||'--'}}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop label='设备内码' show-overflow-tooltip resizable width='80'>
|
|
|
- <template slot-scope='{row}'>{{row.location||'--'}}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop label='事项类型' show-overflow-tooltip resizable min-width='120'>
|
|
|
- <template slot-scope='{row}'>{{row.matters||'--'}}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop label='事项描述' show-overflow-tooltip resizable min-width='310'>
|
|
|
- <template slot-scope='{row}'>{{row.description||'--'}}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop label='更换配件信息' align='center' show-overflow-tooltip resizable>
|
|
|
- <el-table-column prop label='是/否更换' show-overflow-tooltip resizable width='80'>
|
|
|
- <template slot-scope='{row}'>
|
|
|
- <div v-if='row.ismodel==0'>否</div>
|
|
|
- <div v-else-if='row.ismodel==1'>是</div>
|
|
|
- <div v-else>'--'</div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop label='配件名称型号' min-width='100' show-overflow-tooltip resizable>
|
|
|
- <template slot-scope='{row}'>{{row.model||'--'}}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop label='数量' show-overflow-tooltip resizable width='80'>
|
|
|
- <template slot-scope='{row}'>{{row.sl>=0?row.sl:'--'}}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop label='费用(万元)' min-width='110' show-overflow-tooltip resizable>
|
|
|
- <template slot-scope='{row}'>{{row.cost?number_format(row.cost):'--'}}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop label='费用出处' show-overflow-tooltip resizable width='80'>
|
|
|
- <template slot-scope='{row}'>{{row.source||'--'}}</template>
|
|
|
- </el-table-column>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop label='现场照片' show-overflow-tooltip resizable width='80'>
|
|
|
- <template slot-scope='{row}'>
|
|
|
- <div
|
|
|
- v-if='row.glsmsImage'
|
|
|
- style='cursor:pointer;color: #0091ff;'
|
|
|
- @click.stop='clickPic(row.glsmsImage)'
|
|
|
- >{{row.glsmsImage.length+'张'}}</div>
|
|
|
- <div v-else>{{'--'}}</div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop label='填报时间' show-overflow-tooltip resizable width='130'>
|
|
|
+ <div class="compute-item">
|
|
|
+ <div ref="tableBox4" class="compute-table">
|
|
|
+ <el-table
|
|
|
+ :border="true"
|
|
|
+ v-loading="loading"
|
|
|
+ :max-height="tableMaxHeight"
|
|
|
+ :data="table4"
|
|
|
+ style="width: 100%"
|
|
|
+ @row-click="innerTable"
|
|
|
+ :header-cell-style="{background:'rgba(245,246,247,1)',fontFamily:'MicrosoftYaHei',color:'rgba(100,108,115,1)',lineHeight:'16px',fontSize:'12px'}"
|
|
|
+ >
|
|
|
+ <el-table-column type="index" label="序号" width="60" :index="indexMethod"></el-table-column>
|
|
|
+ <el-table-column prop label="设备名称" show-overflow-tooltip resizable min-width="360">
|
|
|
+ <template slot-scope="{row}">{{row.sbmc||'--'}}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop label="位置名称" show-overflow-tooltip resizable min-width="120">
|
|
|
+ <template slot-scope="{row}">{{row.matters||'--'}}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop label="问题描述" show-overflow-tooltip resizable min-width="120">
|
|
|
+ <template slot-scope="{row}">{{row.matters||'--'}}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop label="工单编号" show-overflow-tooltip resizable min-width="120">
|
|
|
+ <template slot-scope="{row}">{{row.matters||'--'}}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop label="修报来源" show-overflow-tooltip resizable min-width="120">
|
|
|
+ <template slot-scope="{row}">{{row.matters||'--'}}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop label="执行人" show-overflow-tooltip resizable min-width="120">
|
|
|
+ <template slot-scope="{row}">{{row.matters||'--'}}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop label="要求完成时间" show-overflow-tooltip resizable min-width="120">
|
|
|
+ <template slot-scope="{row}">{{row.matters||'--'}}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop label="实际完工时间" show-overflow-tooltip resizable min-width="120">
|
|
|
+ <template slot-scope="{row}">{{row.matters||'--'}}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop label="设备内码" show-overflow-tooltip resizable width="80">
|
|
|
+ <template slot-scope="{row}">{{row.location||'--'}}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop label="位置内码" show-overflow-tooltip resizable min-width="120">
|
|
|
+ <template slot-scope="{row}">{{row.matters||'--'}}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop label="保修照片" show-overflow-tooltip resizable width="80">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div
|
|
|
+ v-if="row.glsmsImage"
|
|
|
+ style="cursor:pointer;color: #0091ff;"
|
|
|
+ @click.stop="clickPic(row.glsmsImage)"
|
|
|
+ >{{row.glsmsImage.length+'张'}}</div>
|
|
|
+ <div v-else>{{'--'}}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop label="完工照片" show-overflow-tooltip resizable width="80">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div
|
|
|
+ v-if="row.glsmsImage"
|
|
|
+ style="cursor:pointer;color: #0091ff;"
|
|
|
+ @click.stop="clickPic(row.glsmsImage)"
|
|
|
+ >{{row.glsmsImage.length+'张'}}</div>
|
|
|
+ <div v-else>{{'--'}}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <!-- <el-table-column prop label='填报时间' show-overflow-tooltip resizable width='130'>
|
|
|
<template slot-scope='{row}'>{{row.reportdate?formatter(row.reportdate):'--'}}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop label='验收时间' show-overflow-tooltip width='130' resizable>
|
|
|
+ </el-table-column>-->
|
|
|
+ <!-- <el-table-column prop label='验收时间' show-overflow-tooltip width='130' resizable>
|
|
|
<template slot-scope='{row}'>{{row.sjjssj?formatter(row.sjjssj):'--'}}</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop label='工单编号' show-overflow-tooltip resizable width='80'>
|
|
|
<template slot-scope='{row}'>{{row.wonum||'--'}}</template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
- <pic-large ref='picLargeOpen'></pic-large>
|
|
|
+ </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>
|
|
|
+ <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 { number_format } from '@/utils/format.js'
|
|
|
+import { Select } from "meri-design";
|
|
|
+import moment from "moment";
|
|
|
+import { number_format } from "@/utils/format.js";
|
|
|
|
|
|
export default {
|
|
|
- props: ['table4', 'total', 'page', 'size', 'loading'],
|
|
|
- data() {
|
|
|
- return {
|
|
|
- dateVal: '',
|
|
|
- value1: '',
|
|
|
- searVal: '',
|
|
|
- number_format,
|
|
|
- tableMaxHeight: 0,
|
|
|
- imgUrl: [],
|
|
|
- }
|
|
|
+ props: ["table4", "total", "page", "size", "loading"],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ dateVal: "",
|
|
|
+ value1: "",
|
|
|
+ searVal: "",
|
|
|
+ number_format,
|
|
|
+ tableMaxHeight: 0,
|
|
|
+ imgUrl: []
|
|
|
+ };
|
|
|
+ },
|
|
|
+ components: { Select },
|
|
|
+ methods: {
|
|
|
+ indexMethod(index) {
|
|
|
+ return (this.page - 1) * this.size + index + 1;
|
|
|
},
|
|
|
- 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}`)
|
|
|
- }
|
|
|
- },
|
|
|
- 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
|
|
|
- })
|
|
|
- },
|
|
|
+ formatter(date) {
|
|
|
+ return moment.unix(date / 1000).format("YYYY.MM.DD HH:mm");
|
|
|
},
|
|
|
- updated() {
|
|
|
- this.$nextTick(() => {
|
|
|
- // 页面渲染完成后的回调
|
|
|
- this.tableMaxHeight = this.$refs.tableBox4.offsetHeight
|
|
|
- })
|
|
|
+ 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}`
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
+ 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>
|