123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- <template>
- <div class="lookDetail">
- <div class="list-item">
- <div class="formContent-item_title">工单信息</div>
- <el-form ref="form" label-width="110px">
- <template v-for="(item, index) in formLook">
- <el-col :span="!!item.span ? item.span : 12" :key="index">
- <el-form-item :label="item.label">
- <template v-if="item.slot">
- <template v-if="item.slot === 'inspectionStatus'">
- <span v-if="thisItem['inspectionStatus'] == 1">待执行</span>
- <span v-else-if="thisItem['inspectionStatus'] == 2">执行中</span>
- <span v-else-if="thisItem['inspectionStatus'] == 3">已完成</span>
- <span v-else-if="thisItem['inspectionStatus'] == 4">已完成(超时)</span>
- <span v-else-if="thisItem['inspectionStatus'] == 5">已逾期</span>
- <span v-else>--</span>
- </template>
- </template>
- <template v-else>
- {{ thisItem[item.prop] || '--' }}
- </template>
- </el-form-item>
- </el-col>
- </template>
- </el-form>
- </div>
- <div class="list-item">
- <div class="formContent-item_title">设备巡检信息</div>
- <zz-table
- :cols="cols"
- :settings="{ showIndex: true, stripe: true }"
- :loading="mixins_onQuery"
- :data="mixins_list"
- :pageset="mixins_pageset"
- @page-change="pageChange"
- >
- <template slot="picturePath" slot-scope="scope">
- <div class="imgVdio" v-for="item in scope.row.picturePath.split(',')" :key="item">
- <video v-if="typeVideo(item)" :src="item" @click="lookVideos(item)"></video>
- <el-image class="imgs" v-else :src="item" :preview-src-list="[item]"></el-image>
- </div>
- </template>
- <template slot-scope="scope" slot="opt">
- <div class="opt">
- <el-tooltip effect="light" placement="bottom" content="详情">
- <i class="zoniot_font zoniot-icon-xiangqing" @click="lookDetails(scope.row)"></i>
- </el-tooltip>
- </div>
- </template>
- </zz-table>
- </div>
- </div>
- </template>
- <script >
- import list from '@utils/list.js';
- export default {
- props: ['params'],
- mixins: [list],
- data() {
- return {
- formLook: [
- {
- label: '所属社区:',
- prop: 'communityName'
- },
- {
- label: '任务名称:',
- prop: 'inspectionName'
- },
- {
- label: '设备/设施类型:',
- prop: 'typeValue'
- },
- {
- label: '巡检人员:',
- prop: 'peopleName'
- },
- {
- label: '计划开始时间:',
- prop: 'startDate'
- },
- {
- label: '计划结束时间:',
- prop: 'endDate'
- },
- {
- label: '实际开始时间:',
- prop: 'startTime'
- },
- {
- label: '实际结束时间:',
- prop: 'endTime'
- },
- {
- label: '状态:',
- prop: 'inspectionStatus',
- slot: 'inspectionStatus'
- }
- ],
- cols: [
- {
- label: '设备编号',
- prop: 'no'
- },
- {
- label: '设备名称',
- prop: 'name'
- },
- {
- label: '地址',
- prop: 'address'
- },
- {
- label: '巡检时间',
- prop: 'checkTime'
- },
- {
- label: '巡检结果',
- prop: 'result'
- },
- {
- label: '图片/视频',
- prop: 'picturePath'
- }
- ],
- thisItem: {},
- mixins_post: 'post'
- };
- },
- methods: {
- getDatali(id) {
- this.mixins_dataUrl = '/sc-community/inspectionRecord/findDetail';
- this.mixins_query = {
- id: id,
- type: this.thisItem.type
- };
- this.mixins_search();
- },
- typeVideo(str) {
- let type = str.slice(str.lastIndexOf('.') + 1, str.length);
- let videoType = ['mp4'];
- return videoType.includes(type);
- },
- lookVideos(src) {
- new Promise((resolve) => {
- this.$store.dispatch('addPopup', {
- url: '/lookVideo.vue',
- width: '600px',
- height: '500px',
- props: {
- src: src,
- callback: resolve
- },
- showConfirmButton: true,
- showCancelButton: true,
- hideStar: true,
- title: '查看视频'
- });
- }).then(() => {
- this.mixins_search();
- });
- }
- },
- created() {
- this.thisItem = this.params.data;
- this.getDatali(this.params.data.id);
- }
- };
- </script>
- <style lang="scss" scoped>
- @import '@assets/css/public-style.scss';
- .formContent-item_title {
- clear: both;
- }
- </style>
|