From ccf28d1fed1aa2e5437dbe64b5133ba1cbde6ec7 Mon Sep 17 00:00:00 2001
From: renkang <8417338+k94314517@user.noreply.gitee.com>
Date: 星期五, 03 一月 2025 15:30:52 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
h5/pages/workOrder/detail.vue | 221 +++++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 181 insertions(+), 40 deletions(-)
diff --git a/h5/pages/workOrder/detail.vue b/h5/pages/workOrder/detail.vue
index 1b763a0..c112a22 100644
--- a/h5/pages/workOrder/detail.vue
+++ b/h5/pages/workOrder/detail.vue
@@ -2,67 +2,76 @@
<view>
<view class="main_info">
<view class="title">
- <text>闃滃畞鏂囦綋涓績/A搴�/401</text>
- <text class="status">寰呭鐞�</text>
+ <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 gray" v-if="info.dealStatus == 2">宸插鐞�</text>
</view>
- <view class="desc">瑗胯竟璧板粖鐨勪竴涓《鐏潖浜嗭紝涓嶄寒闇�瑕佺淮淇タ杈�</view>
+ <view class="desc">{{ info.content }}</view>
<view class="file_list">
- <view class="file">
-
+ <view class="file" v-for="(item,index) in info.fileList">
+ <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="line">
+ <view class="line" v-if="info.categoryName">
<view class="la">宸ュ崟绫诲瀷锛�</view>
- <view class="val">1111</view>
+ <view class="val">{{info.categoryName}}</view>
</view>
<view class="line">
<view class="la">涓婃姤浜猴細</view>
- <view class="val">1111</view>
+ <view class="val">{{ info.creatorName }}{{info.creatorCompany ? '-' + info.creatorCompany : ''}}</view>
</view>
- <view class="line">
+ <view class="line" v-if="info.creatorPhone || info.creatorMobile">
<view class="la">鑱旂郴鐢佃瘽锛�</view>
- <view class="val">1111</view>
+ <view class="val">{{ info.creatorMobile || info.creatorPhone }}</view>
</view>
<view class="line">
<view class="la">涓婃姤鏃堕棿锛�</view>
- <view class="val">1111</view>
+ <view class="val">{{ info.createDate }}</view>
</view>
- <view class="line">
+ <view class="line" v-if="info.getDate">
<view class="la">涓婇棬鏃堕棿锛�</view>
- <view class="val">1111</view>
+ <view class="val">{{ info.getDate.slice(0, 16) }}</view>
</view>
</view>
- <view class="result_wrap">
+ <view class="result_wrap" v-if="info.dealStatus == 2">
<div class="title">澶勭悊缁撴灉</div>
- <view class="file_list">
- <view class="file">
-
+ <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="aspectFill"></image>
+ <video v-if="item.type == 1" :src="item.fileurlFull" :controls="false"></video>
</view>
</view>
- <view class="content">
- 宸叉洿鎹㈢伅娉″拰鐏僵宸叉洿鎹㈢伅娉″拰鐏僵宸叉洿鎹㈢伅
+ <view v-if="info.dealInfo" class="content">
+ {{info.dealInfo}}
</view>
<view class="line">
<view class="la">澶勭悊浜猴細</view>
- <view class="val">{{ 1111 }}</view>
+ <view class="val">{{ info.dealUserName }}{{info.dealUserCompany ? '-' + info.dealUserCompany : ''}}</view>
</view>
<view class="line">
<view class="la">澶勭悊鏃堕棿锛�</view>
- <view class="val">{{ 1111 }}</view>
+ <view class="val">{{ info.dealDate }}</view>
</view>
</view>
</view>
<!-- -->
- <view class="btns">
- <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" closeOnClickOverlay>
+ <u-popup :show="showUpload" @close="showUpload = false" zIndex="10076" closeOnClickOverlay>
<view class="sel_upload_wrap">
<view class="btn" @click="uploadImage">閫夋嫨鍥剧墖</view>
<view class="btn" @click="uploadVideo">閫夋嫨瑙嗛</view>
@@ -70,11 +79,12 @@
</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">
- <view>澶勭悊鏃堕棿</view>
+ <view><text class="red">*</text>澶勭悊鏃堕棿</view>
<view class="df_ac" @click="isShowHandleDate = true" v-if="handleParam.dealTime">
{{ handleParam.dealTime }}
<u-icon name="arrow-right"></u-icon>
@@ -86,7 +96,6 @@
</view>
<view class="label">
- <text>*</text>
涓婁紶鍥剧墖/瑙嗛
</view>
<view class="upload_wrap">
@@ -96,7 +105,7 @@
</view>
<view class="adduser_list_item_ipt1_upload" v-for="(item, i) in dealFileList" :key="i">
<u-icon class="close" size="20" name="close-circle-fill" color="red"
- @click="fileDel('dealBeforeFileList', i)"></u-icon>
+ @click="fileDel('dealFileList', i)"></u-icon>
<image v-if="item.type == 0" :src="item.fileurlFull" mode="widthFix"></image>
<video v-if="item.type == 1" :src="item.fileurlFull" :controls="false"></video>
</view>
@@ -114,27 +123,98 @@
<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
+ uploadUrl,
+ ywWorkorderD,
+ ywWorkorderDeal
} from '@/api'
import dayjs from 'dayjs';
export default {
data() {
return {
+ id: '',
+ info: {},
showUpload: false,
isShowHandle: false,
isShowHandleDate: false,
+ userInfo: uni.getStorageSync('userInfo') || {},
handleParam: {},
- dealFileList: []
+ dealFileList: [],
+
+ videoPlay: false,
+ videoContext: null,
+ videoUrl: ''
};
},
+ onLoad(option) {
+ console.log(option);
+ this.id = option.id
+ this.getDetail()
+ },
methods: {
+ 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 // 鍊紅rue涓鸿繘鍏ュ叏灞忥紝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 => {
+ this.info = res.data
+ })
},
callPhone() {
uni.makePhoneCall({
@@ -152,7 +232,7 @@
this.showUpload = false;
let token = uni.getStorageSync('token') || '';
uni.chooseImage({
- count: 4,
+ count: 6,
success: chooseImageRes => {
uni.showLoading({
title: '涓婁紶涓�',
@@ -170,7 +250,7 @@
files: imgs,
name: 'file',
formData: {
- folder: 'HIDDEN_DANGER_FILE'
+ folder: 'YW_WORKORDER_FILE'
},
header: {
Dm_user_token: token
@@ -182,7 +262,7 @@
i.type = 0;
i.fileurl = i.imgaddr;
i.fileurlFull = i.url;
- this.submitFileList.push(i);
+ this.dealFileList.push(i);
});
}
},
@@ -216,7 +296,7 @@
},
name: 'file',
formData: {
- folder: 'HIDDEN_DANGER_FILE'
+ folder: 'YW_WORKORDER_FILE'
},
success: uploadFileRes => {
let res = JSON.parse(uploadFileRes.data);
@@ -225,7 +305,7 @@
i.type = 1;
i.fileurl = i.imgaddr;
i.fileurlFull = i.url;
- this.submitFileList.push(i);
+ this.dealFileList.push(i);
});
}
},
@@ -264,6 +344,10 @@
font-size: 28rpx;
color: $primaryColor;
}
+
+ .gray {
+ color: #999999;
+ }
}
.file_list {
@@ -279,6 +363,12 @@
&:nth-of-type(4n) {
margin-right: 0;
+ }
+
+ image,
+ video {
+ width: 156rpx;
+ height: 156rpx;
}
}
}
@@ -368,7 +458,7 @@
.sel_upload_wrap {
width: 100%;
- border-top: 1px solid #333333;
+ border-top: 1px solid #666666;
box-shadow: 0 1 1 #333333;
.btn {
@@ -442,28 +532,37 @@
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 {
@@ -477,4 +576,46 @@
}
}
}
+
+ .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>
\ No newline at end of file
--
Gitblit v1.9.3