master
xielei 2024-11-18 14:37:18 +08:00
parent 4aa08a42c4
commit 37a3da8f6c
6 changed files with 62 additions and 29 deletions

View File

@ -41,16 +41,16 @@
<text>巡检问题描述</text> <text>巡检问题描述</text>
<u--textarea v-model="queItem.problemDesc" placeholder="请输入内容" disabled ></u--textarea> <u--textarea v-model="queItem.problemDesc" placeholder="请输入内容" disabled ></u--textarea>
</view> </view>
<view class="itemNo" style="flex-direction: column;"> <view class="itemNo" >
<text>巡检图片</text> <view>巡检图片</view>
<view class="" v-for="item in queItem.inspectPics"> <view class="" v-for="item in queItem.inspectPics" style="display: inline-block;">
<image :src="item.url" style="width: 80px;height: 80px;margin: 5px;" @click="previewImage(item)"></image> <image :src="item.url" style="width: 80px;height: 80px;margin: 5px;" @click="previewImage(item)"></image>
</view> </view>
</view> </view>
<view class="itemNo" style="flex-direction: column;"> <view class="itemNo" >
<text>巡检视频</text> <view>巡检视频</view>
<view class="" v-for="item in queItem.inspectVideos"> <view class="" v-for="item in queItem.inspectVideos" style="display: inline-block;">
<video :src="item.url" style="width: 80px;height: 80px;margin: 5px;" show-fullscreen-btn></video> <video :src="item.url" style="width: 80px;height: 80px;margin: 5px;" show-fullscreen-btn></video>
</view> </view>
</view> </view>
@ -75,10 +75,15 @@
name="handlePics" multiple name="handlePics" multiple
:maxCount="10"></u-upload> :maxCount="10"></u-upload>
</u-form-item> </u-form-item>
<u-form-item label="处理视频" prop="handleVideos" borderBottom labelPosition='top'> <u-form-item label="处理视频" prop="handleVideos" borderBottom labelPosition='top' v-if="queItem.handleVideos.length">
<u-upload accept="video" :fileList="queItem.handleVideos" disabled <!-- <u-upload accept="video" :fileList="queItem.handleVideos" disabled
name="handleVideos" multiple name="handleVideos" multiple
:maxCount="10"></u-upload> :maxCount="10"></u-upload> -->
<view class="itemEve">
<view class="" v-for="item in queItem.handleVideos" style="display: inline-block;">
<video :src="item.url" style="width: 80px;height: 80px;margin: 5px;" x5-video-player-type="h5" playsinline webkit-playsinline></video>
</view>
</view>
</u-form-item> </u-form-item>
</view> </view>
</u--form> </u--form>

View File

@ -17,14 +17,14 @@
multiple accept='image' :maxCount="10"></u-upload> multiple accept='image' :maxCount="10"></u-upload>
</u-form-item> </u-form-item>
<u-form-item label="现场视频" prop="videos" borderBottom labelPosition='top' labelWidth="100px"> <u-form-item label="现场视频" prop="videos" borderBottom labelPosition='top' labelWidth="100px" v-if="model1.videos.length">
<!-- <u-upload :fileList="model1.videos" name="videos" multiple disabled <!-- <u-upload :fileList="model1.videos" name="videos" multiple disabled
multiple accept='video' :maxCount="10"></u-upload> --> multiple accept='video' :maxCount="10"></u-upload> -->
<view v-if="model1.videos.length" class="itemEve"> <view class="itemEve">
<text>现场视频:</text> <view class="" v-for="item in model1.videos" style="display: inline-block;">
<view class="" v-for="item in model1.videos"> <video :src="item.url" style="width: 80px;height: 80px;margin: 5px;" x5-video-player-type="h5" playsinline webkit-playsinline></video>
<video :src="item.url" style="width: 80px;height: 80px;margin: 5px;" x5-video-player-type="h5" playsinline webkit-playsinline></video> </view>
</view>
</view> </view>
</u-form-item> </u-form-item>
</u--form> </u--form>

View File

@ -20,7 +20,7 @@
</view> </view>
<view class="" v-if="o.isNormal == 0"> <view class="" v-if="o.isNormal == 0">
<view class="itemEve"> <view class="itemEve">
<text>现场图片:</text> <view>现场图片:</view>
<view class="" v-for="item in o.inspectPics"> <view class="" v-for="item in o.inspectPics">
<image :src="item.url" style="width: 80px;height: 80px;margin: 5px;" @click="previewImage(item)"></image> <image :src="item.url" style="width: 80px;height: 80px;margin: 5px;" @click="previewImage(item)"></image>
</view> </view>
@ -28,8 +28,8 @@
<view class="itemEve" v-if="IndexList.find(i=>i==index)"> <view class="itemEve" v-if="IndexList.find(i=>i==index)">
<text>现场视频:</text> <view>现场视频:</view>
<view class="" v-for="item in o.inspectVideos"> <view class="" v-for="item in o.inspectVideos" style="display: inline-block;">
<video :src="item.url" style="width: 80px;height: 80px;margin: 5px;" id='videoww' :controls='false' :show-fullscreen-btn="true" :show-progress='false' :webkit-playsinline="true" @click="fullScreen('videoww')"></video> <video :src="item.url" style="width: 80px;height: 80px;margin: 5px;" id='videoww' :controls='false' :show-fullscreen-btn="true" :show-progress='false' :webkit-playsinline="true" @click="fullScreen('videoww')"></video>
</view> </view>
</view> </view>
@ -40,14 +40,14 @@
</view> </view>
<view class="" v-if="o.isHandle == 1"> <view class="" v-if="o.isHandle == 1">
<view style="" class="itemEve" v-if="o.handlePics.length"> <view style="" class="itemEve" v-if="o.handlePics.length">
<text>处理图片:</text> <view>处理图片:</view>
<view class="" v-for="item in o.handlePics"> <view class="" v-for="item in o.handlePics">
<image :src="item.url" style="width: 80px;height: 80px;margin: 5px;" @click="previewImage(item)"></image> <image :src="item.url" style="width: 80px;height: 80px;margin: 5px;" @click="previewImage(item)"></image>
</view> </view>
</view> </view>
<view style="" v-if="IndexList.find(i=>i==index)" class="itemEve" > <view style="" v-if="IndexList.find(i=>i==index)" class="itemEve" >
<text>处理视频:</text> <view>处理视频:</view>
<view class="" v-for="item in o.handleVideos"> <view class="" v-for="item in o.handleVideos" style="display: inline-block;">
<video :src="item.url" style="width: 80px;height: 80px;margin: 5px;" show-fullscreen-btn webkit-playsinline="true"></video> <video :src="item.url" style="width: 80px;height: 80px;margin: 5px;" show-fullscreen-btn webkit-playsinline="true"></video>
</view> </view>

View File

@ -76,8 +76,12 @@
@delete="(e)=>deletePic(e,queItem)" name="handlePics" multiple @delete="(e)=>deletePic(e,queItem)" name="handlePics" multiple
:maxCount="10"></u-upload> :maxCount="10"></u-upload>
</u-form-item> </u-form-item>
<u-form-item label="处理视频" prop="handleVideos" borderBottom labelPosition='top'> <u-form-item label="处理视频" prop="inspectVideos" borderBottom labelPosition='top'>
<u-upload accept="video" :fileList="queItem.handleVideos" <view class="" v-for="(item,index) in queItem.handleVideos" style="position: relative;">
<uni-icons type="clear" size="30" style="position: absolute;right: 0; top:0;z-index: 2;;color: aliceblue;" @click="deletePic({name:'handleVideos',index:index})"> </uni-icons>
<video :src="item.url" style="width: 80px;height: 80px;margin: 5px;z-index: 1;" show-fullscreen-btn webkit-playsinline="true"></video>
</view>
<u-upload accept="video"
@afterRead="(e)=>afterRead(e,queItem)" @afterRead="(e)=>afterRead(e,queItem)"
@delete="(e)=>deletePic(e,queItem)" name="handleVideos" multiple @delete="(e)=>deletePic(e,queItem)" name="handleVideos" multiple
:maxCount="10"></u-upload> :maxCount="10"></u-upload>
@ -103,7 +107,9 @@
stm: '', stm: '',
etm: '' etm: ''
}, },
queItem:{}, queItem:{
inspectVideos:[]
},
list: [{ list: [{
title: '5-29日常巡检', title: '5-29日常巡检',
state: 0, state: 0,
@ -139,6 +145,12 @@
item.url ='http://223.75.53.141:9102/test.by-lyf.tmp' + item.filePath item.url ='http://223.75.53.141:9102/test.by-lyf.tmp' + item.filePath
return item return item
}) })
console.log(this.queItem.handleVideos?.length);
if(!this.queItem.handleVideos?.length){
this.queItem.handleVideos=[]
}
}, },
methods: { methods: {
submit(){ submit(){

View File

@ -19,9 +19,17 @@
</u-form-item> </u-form-item>
<u-form-item label="现场视频" prop="videos" borderBottom labelPosition='top' labelWidth="100px"> <u-form-item label="现场视频" prop="videos" borderBottom labelPosition='top' labelWidth="100px">
<u-upload :fileList="model1.videos" @afterRead="(e)=>afterRead(e,'videos')" @delete="deletePic" name="videos" multiple webkit-playsinline="true" <view class="" v-for="(item,index) in model1.videos" style="position: relative;">
multiple accept='video' :maxCount="10"></u-upload> <uni-icons type="clear" size="30" style="position: absolute;right: 0; top:0;z-index: 2;;color: aliceblue;" @click="deletePic({name:'videos',index:index})"> </uni-icons>
<video :src="item.url" style="width: 80px;height: 80px;margin: 5px;z-index: 1;" show-fullscreen-btn webkit-playsinline="true"></video>
</view>
<u-upload @afterRead="(e)=>afterRead(e,'videos')" name="videos" multiple
multiple accept='video' :maxCount="10">
<!-- {JSON.stringfymodel1.videos} -->
</u-upload>
</u-form-item> </u-form-item>
</u--form> </u--form>
<u-action-sheet :show="showSex" :actions="actions" title="请选择管护类型" @close="showSex = false" @select="sexSelect"> <u-action-sheet :show="showSex" :actions="actions" title="请选择管护类型" @close="showSex = false" @select="sexSelect">

View File

@ -28,7 +28,11 @@
:maxCount="10"></u-upload> :maxCount="10"></u-upload>
</u-form-item> </u-form-item>
<u-form-item label="现场视频" prop="inspectVideos" borderBottom> <u-form-item label="现场视频" prop="inspectVideos" borderBottom>
<u-upload accept="video" :fileList="o.inspectVideos" <view class="" v-for="(item,index) in o.inspectVideos" style="position: relative;">
<uni-icons type="clear" size="30" style="position: absolute;right: 0; top:0;z-index: 2;;color: aliceblue;" @click="deletePic({name:'inspectVideos',index:index},o,index,i)"> </uni-icons>
<video :src="item.url" style="width: 80px;height: 80px;margin: 5px;z-index: 1;" show-fullscreen-btn webkit-playsinline="true"></video>
</view>
<u-upload accept="video"
@afterRead="(e)=>afterRead(e,o,index,i)" @afterRead="(e)=>afterRead(e,o,index,i)"
@delete="(e)=>deletePic(e,o,index,i)" name="inspectVideos" multiple @delete="(e)=>deletePic(e,o,index,i)" name="inspectVideos" multiple
:maxCount="10"></u-upload> :maxCount="10"></u-upload>
@ -49,7 +53,11 @@
:maxCount="10"></u-upload> :maxCount="10"></u-upload>
</u-form-item> </u-form-item>
<u-form-item label="处理视频" prop="handleVideos" borderBottom> <u-form-item label="处理视频" prop="handleVideos" borderBottom>
<u-upload accept="video" :fileList="o.handleVideos" <view class="" v-for="(item,index) in o.handleVideos" style="position: relative;">
<uni-icons type="clear" size="30" style="position: absolute;right: 0; top:0;z-index: 2;;color: aliceblue;" @click="deletePic({name:'handleVideos',index:index},o,index,i)"> </uni-icons>
<video :src="item.url" style="width: 80px;height: 80px;margin: 5px;z-index: 1;" show-fullscreen-btn webkit-playsinline="true"></video>
</view>
<u-upload accept="video"
@afterRead="(e)=>afterRead(e,o,index,i)" @afterRead="(e)=>afterRead(e,o,index,i)"
@delete="(e)=>deletePic(e,o,index,i)" name="handleVideos" multiple @delete="(e)=>deletePic(e,o,index,i)" name="handleVideos" multiple
:maxCount="10"></u-upload> :maxCount="10"></u-upload>