|  |  |  | 
|---|
|  |  |  | <view class="title"> | 
|---|
|  |  |  | <text>{{ info.projectName }}/{{ info.buildingName }}/{{info.roomNum || info.floorName}}</text> | 
|---|
|  |  |  | <text class="status" v-if="info.dealStatus == 0">待处理</text> | 
|---|
|  |  |  | <text class="status" v-if="info.dealStatus == 1">已指派</text> | 
|---|
|  |  |  | <text class="status" v-if="info.dealStatus == 1">待处理</text> | 
|---|
|  |  |  | <text class="status gray" v-if="info.dealStatus == 2">已处理</text> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="desc">{{ info.content }}</view> | 
|---|
|  |  |  | <view class="file_list"> | 
|---|
|  |  |  | <view class="file" v-for="(item,index) in info.fileList"> | 
|---|
|  |  |  | <image v-if="item.type == 0" :src="item.fileurlFull" mode="widthFix"></image> | 
|---|
|  |  |  | <video v-if="item.type == 1" :src="item.fileurlFull" :controls="false"></video> | 
|---|
|  |  |  | <image v-if="item.type == 0" :src="item.fileurlFull" mode="aspectFill"></image> | 
|---|
|  |  |  | <!-- <video v-if="item.type == 1" :src="item.fileurlFull" :controls="false"></video> --> | 
|---|
|  |  |  | <view v-if="item.type == 1" @click="videoClick(item)" class="video_wrap"> | 
|---|
|  |  |  | <video :src="item.fileurlFull" initial-time="0.01" :show-center-play-btn="false" :controls="false" | 
|---|
|  |  |  | class="video" :enable-progress-gesture="false" autoplay muted /> | 
|---|
|  |  |  | <image src="@/static/play.png" class="play" mode=""></image> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="content"> | 
|---|
|  |  |  | 
|---|
|  |  |  | <view class="la">上报人:</view> | 
|---|
|  |  |  | <view class="val">{{ info.creatorName }}{{info.creatorCompany ? '-' + info.creatorCompany : ''}}</view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="line"  v-if="info.creatorPhone"> | 
|---|
|  |  |  | <view class="line" v-if="info.creatorPhone || info.creatorMobile"> | 
|---|
|  |  |  | <view class="la">联系电话:</view> | 
|---|
|  |  |  | <view class="val">{{ info.creatorPhone }}</view> | 
|---|
|  |  |  | <view class="val">{{ info.creatorMobile || info.creatorPhone }}</view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="line"> | 
|---|
|  |  |  | <view class="la">上报时间:</view> | 
|---|
|  |  |  | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="line" v-if="info.getDate"> | 
|---|
|  |  |  | <view class="la">上门时间:</view> | 
|---|
|  |  |  | <view class="val">{{ info.getDate }}</view> | 
|---|
|  |  |  | <view class="val">{{ info.getDate.slice(0, 16) }}</view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="result_wrap" v-if="info.dealStatus == 2"> | 
|---|
|  |  |  | <div class="title">处理结果</div> | 
|---|
|  |  |  | <view v-if="info.dealFileList && info.dealFileList.length > 0" class="file_list"> | 
|---|
|  |  |  | <view class="file" v-for="item in info.dealFileList"> | 
|---|
|  |  |  | <image v-if="item.type == 0" :src="item.fileurlFull" mode="widthFix"></image> | 
|---|
|  |  |  | <image v-if="item.type == 0" :src="item.fileurlFull" mode="aspectFill"></image> | 
|---|
|  |  |  | <video v-if="item.type == 1" :src="item.fileurlFull" :controls="false"></video> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="line"> | 
|---|
|  |  |  | <view class="la">处理人:</view> | 
|---|
|  |  |  | <view class="val">{{ info.dealUserName }}</view> | 
|---|
|  |  |  | <view class="val">{{ info.dealUserName }}{{info.dealUserCompany ? '-' + info.dealUserCompany : ''}}</view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="line"> | 
|---|
|  |  |  | <view class="la">处理时间:</view> | 
|---|
|  |  |  | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <!--  --> | 
|---|
|  |  |  | <view class="btns" v-if="info.dealStatus == 0"> | 
|---|
|  |  |  | <view class="btn"> | 
|---|
|  |  |  | <view class="btns" v-if="info.dealStatus == 0 || (info.dealUserId === userInfo.id && info.dealStatus == 1)"> | 
|---|
|  |  |  | <view class="btn" @click="handleCall"> | 
|---|
|  |  |  | <image src="@/static/side/phoneed.png" class="icon"></image> | 
|---|
|  |  |  | <text>上报人</text> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="btn active" @click="isShowHandle = true">去处理</view> | 
|---|
|  |  |  | <view class="btn active" @click="handleOpen">去处理</view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <!--  --> | 
|---|
|  |  |  | <u-popup :show="showUpload" @close="showUpload = false" zIndex="10076" closeOnClickOverlay> | 
|---|
|  |  |  | 
|---|
|  |  |  | </u-popup> | 
|---|
|  |  |  | <!--  --> | 
|---|
|  |  |  | <!-- 工单处理 --> | 
|---|
|  |  |  | <u-popup :show="isShowHandle" :round="10" :safeAreaInsetBottom="true" mode="bottom" closeable | 
|---|
|  |  |  | @close="isShowHandle = false"> | 
|---|
|  |  |  | <u-popup :show="isShowHandle" :round="10" :safeAreaInsetTop="true" :safeAreaInsetBottom="true" mode="bottom" | 
|---|
|  |  |  | closeable @close="isShowHandle = false"> | 
|---|
|  |  |  | <view class="appr_modal"> | 
|---|
|  |  |  | <view class="title">工单处理</view> | 
|---|
|  |  |  | <view class="df_sb"> | 
|---|
|  |  |  | 
|---|
|  |  |  | <u-datetime-picker :minDate="new Date().getTime()" :show="isShowHandleDate" @confirm="confirmHandleDate" | 
|---|
|  |  |  | @cancel="isShowHandleDate = false" mode="datetime"></u-datetime-picker> | 
|---|
|  |  |  | <!--  --> | 
|---|
|  |  |  | <view v-if="videoPlay" class="video_app"> | 
|---|
|  |  |  | <video controls autoplay muted x5-video-player-type="h5" x5-video-player-fullscreen="true" id="myvideo" | 
|---|
|  |  |  | :src="videoUrl" @fullscreenchange="screenChange"></video> | 
|---|
|  |  |  | <view class="bg" @click="closeVideo"></view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script> | 
|---|
|  |  |  | import { | 
|---|
|  |  |  | uploadUrl, | 
|---|
|  |  |  | ywWorkorderD, | 
|---|
|  |  |  | ywWorkorderD, | 
|---|
|  |  |  | ywWorkorderDeal | 
|---|
|  |  |  | } from '@/api' | 
|---|
|  |  |  | import dayjs from 'dayjs'; | 
|---|
|  |  |  | 
|---|
|  |  |  | showUpload: false, | 
|---|
|  |  |  | isShowHandle: false, | 
|---|
|  |  |  | isShowHandleDate: false, | 
|---|
|  |  |  | userInfo: uni.getStorageSync('userInfo') || {}, | 
|---|
|  |  |  | handleParam: {}, | 
|---|
|  |  |  | dealFileList: [] | 
|---|
|  |  |  | dealFileList: [], | 
|---|
|  |  |  |  | 
|---|
|  |  |  | videoPlay: false, | 
|---|
|  |  |  | videoContext: null, | 
|---|
|  |  |  | videoUrl: '' | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | onLoad(option) { | 
|---|
|  |  |  | 
|---|
|  |  |  | this.getDetail() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | methods: { | 
|---|
|  |  |  | onSubmit() { | 
|---|
|  |  |  | const { handleParam, dealFileList, id } = this | 
|---|
|  |  |  | if (!handleParam.dealTime) return this.showToast('处理时间不能为空') | 
|---|
|  |  |  | ywWorkorderDeal({ | 
|---|
|  |  |  | ...handleParam, | 
|---|
|  |  |  | id, | 
|---|
|  |  |  | dealFileList | 
|---|
|  |  |  | }).then(res => { | 
|---|
|  |  |  | if(res.code == 200){ | 
|---|
|  |  |  | this.showToast('操作成功') | 
|---|
|  |  |  | uni.navigateBack() | 
|---|
|  |  |  | } | 
|---|
|  |  |  | handleOpen() { | 
|---|
|  |  |  | this.isShowHandle = true | 
|---|
|  |  |  | this.$set(this.handleParam, 'dealTime', dayjs().format('YYYY-MM-DD HH:mm:ss')); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | videoClick(item) { | 
|---|
|  |  |  | this.videoPlay = true; | 
|---|
|  |  |  | this.videoContext = uni.createVideoContext("myvideo", this); // this这个是实例对象 必传 | 
|---|
|  |  |  | this.videoUrl = item.fileurlFull; | 
|---|
|  |  |  | this.videoContext.requestFullScreen(); | 
|---|
|  |  |  | this.$nextTick(() => { | 
|---|
|  |  |  | this.videoContext.play(); | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | screenChange(e) { | 
|---|
|  |  |  | let fullScreen = e.detail.fullScreen // 值true为进入全屏,false为退出全屏 | 
|---|
|  |  |  | if (!fullScreen) { | 
|---|
|  |  |  | //退出全屏 | 
|---|
|  |  |  | this.videoPlay = false // 隐藏播放盒子 | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | closeVideo() { | 
|---|
|  |  |  | this.videoPlay = false | 
|---|
|  |  |  | this.videoContext = null | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | onSubmit() { | 
|---|
|  |  |  | const { | 
|---|
|  |  |  | handleParam, | 
|---|
|  |  |  | dealFileList, | 
|---|
|  |  |  | id | 
|---|
|  |  |  | } = this | 
|---|
|  |  |  | if (!handleParam.dealTime) return this.showToast('处理时间不能为空') | 
|---|
|  |  |  | ywWorkorderDeal({ | 
|---|
|  |  |  | ...handleParam, | 
|---|
|  |  |  | id, | 
|---|
|  |  |  | dealFileList | 
|---|
|  |  |  | }).then(res => { | 
|---|
|  |  |  | if (res.code == 200) { | 
|---|
|  |  |  | this.showToast('操作成功') | 
|---|
|  |  |  | uni.navigateBack() | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | handleCall() { | 
|---|
|  |  |  | const { | 
|---|
|  |  |  | info | 
|---|
|  |  |  | } = this | 
|---|
|  |  |  | uni.makePhoneCall({ | 
|---|
|  |  |  | phoneNumber: info.creatorMobile | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | getDetail() { | 
|---|
|  |  |  | ywWorkorderD(this.id).then(res => { | 
|---|
|  |  |  | 
|---|
|  |  |  | image, | 
|---|
|  |  |  | video { | 
|---|
|  |  |  | width: 156rpx; | 
|---|
|  |  |  | height: 156rpx; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | flex-wrap: wrap; | 
|---|
|  |  |  | margin-bottom: 30rpx; | 
|---|
|  |  |  | max-height: 362rpx; | 
|---|
|  |  |  | overflow-y: auto; | 
|---|
|  |  |  | margin-right: -30rpx; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .adduser_list_item_ipt1_upload { | 
|---|
|  |  |  | margin-top: 24rpx; | 
|---|
|  |  |  | width: 156rpx; | 
|---|
|  |  |  | height: 156rpx; | 
|---|
|  |  |  | margin-right: 24rpx; | 
|---|
|  |  |  | border: 2rpx solid #e5e5e5; | 
|---|
|  |  |  | margin-right: 22rpx; | 
|---|
|  |  |  | border: 1rpx solid #e5e5e5; | 
|---|
|  |  |  | background: #f7f7f7; | 
|---|
|  |  |  | color: #666666; | 
|---|
|  |  |  | font-size: 22rpx; | 
|---|
|  |  |  | box-sizing: border-box; | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | flex-direction: column; | 
|---|
|  |  |  | align-items: center; | 
|---|
|  |  |  | justify-content: center; | 
|---|
|  |  |  | position: relative; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | &:nth-of-type(4n) { | 
|---|
|  |  |  | margin-right: 0; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .close { | 
|---|
|  |  |  | position: absolute; | 
|---|
|  |  |  | right: -20rpx; | 
|---|
|  |  |  | top: -20rpx; | 
|---|
|  |  |  | z-index: 9999; | 
|---|
|  |  |  | background-color: #fff; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | image { | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .video_wrap { | 
|---|
|  |  |  | position: relative; | 
|---|
|  |  |  | border: 1px solid; | 
|---|
|  |  |  | width: 156rpx; | 
|---|
|  |  |  | height: 156rpx; | 
|---|
|  |  |  | border-radius: 4rpx; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .play { | 
|---|
|  |  |  | width: 60rpx !important; | 
|---|
|  |  |  | height: 60rpx !important; | 
|---|
|  |  |  | position: absolute; | 
|---|
|  |  |  | top: 50%; | 
|---|
|  |  |  | left: 50%; | 
|---|
|  |  |  | transform: translate(-50%, -50%); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .video_app { | 
|---|
|  |  |  | overflow: hidden; | 
|---|
|  |  |  | position: fixed; | 
|---|
|  |  |  | left: 0; | 
|---|
|  |  |  | top: 0; | 
|---|
|  |  |  | width: 100vw; | 
|---|
|  |  |  | height: 100vh; | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | align-items: center; | 
|---|
|  |  |  | z-index: 9990; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .bg { | 
|---|
|  |  |  | background-color: rgba(0, 0, 0, .6); | 
|---|
|  |  |  | position: absolute; | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | height: 100%; | 
|---|
|  |  |  | z-index: -1; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | video { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | height: 42vh; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </style> | 
|---|