Loading src/api/videoControl/videoPreview.js +18 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,23 @@ export function listAiRegionManage(query) { }) } // 获取左侧树 export function videoTreeListManage(query) { return request({ url: '/yunshou/aiRegionManage/videoTreeList', method: 'get', params: query }) } // 获取根据点位ID获取设备 export function idDevice(id) { return request({ url: `/yunshou/aiRegionManage/getVideoInfoById/${id}`, method: 'get', }) } // 查询设备列表x详情 export function detailDevice(id) { return request({ Loading Loading @@ -62,3 +79,4 @@ export function exportDevice(data) { data: data }) } src/components/ImageUpload/index.vue +0 −1 Original line number Diff line number Diff line Loading @@ -103,7 +103,6 @@ watch(() => props.modelValue, val => { if (typeof item === "string") { if (item.indexOf(baseUrl) === -1) { item = { name: baseUrl + item, url: baseUrl + item }; console.log("🚀 ~ watch ~ item:", item) } else { item = { name: item, url: item }; } Loading src/components/ImgVideoUpload/index.vue +3 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ :before-remove="handleDelete" :show-file-list="false" :headers="headers" :file-list="fileList" :on-preview="handlePictureCardPreview" :class="{ hide: fileList.length >= limit }" > Loading Loading @@ -61,6 +62,7 @@ append-to-body > <video width="100%" v-if="getFileType(dialogImageUrl)=='video'" :src="dialogImageUrl" controls Loading Loading @@ -151,6 +153,7 @@ watch(() => props.modelValue, val => { // 上传前loading加载 function handleBeforeUpload(file) { console.log("🚀 ~ handleBeforeUpload ~ file:", file) let isImg = false; if (props.fileType.length) { let fileExtension = ""; Loading src/views/algorithmControl/components/form.vue +2 −1 Original line number Diff line number Diff line Loading @@ -275,7 +275,7 @@ </el-row> <el-row :gutter="10" class="mb8"> <el-col :span="24"> <el-form-item label-width="130px" label="在线体验案例图片/视频" prop="algorithmBannerVideo"> <el-form-item label-width="130px" label="在线体验案例图片/视频" prop="imgVideoData"> <ImgVideoUpload :modelValue="imgVideoData" :fileType="['png', 'jpg', 'mp4']" Loading Loading @@ -515,6 +515,7 @@ function getImageUrl(url){ form.value.cardImg=url } function getAlgorithmBannerVideo(url){ console.log("🚀 ~ getAlgorithmBanner ~ url:", url) form.value.algorithmBannerVideo=url } function getAlgorithmBanner(url){ Loading src/views/algorithmList/components/details.vue +15 −3 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ </video> </div> <ImgVideoUpload v-if="form.algorithmStatus=='0'" style="position: absolute;bottom: 5px;left: 26%;" :modelValue="uploadUrl" :fileType="['png', 'jpg', 'mp4']" Loading @@ -77,6 +78,9 @@ :isShowTip="false" @update:modelObj="getImgObj" /> <div v-else style="position: absolute;bottom: 5px;left: 26%;" class="text-style"> 请开启算法 </div> <!-- <ImageUpload :limit='1' :fileSize="5" :isShowTip="false" @update:modelObj="getImgObj"/> --> </div> </el-card> Loading @@ -93,7 +97,7 @@ <source :src="'http://192.168.3.82'+nowImg" type="video/mp4" /> </video> </div> <el-button type="primary" plain @click="openIdentify" style="margin: 10px 0;">开始识别</el-button> <el-button v-if="form.algorithmStatus=='0'" type="primary" plain @click="openIdentify" style="margin: 10px 0;">开始识别</el-button> </el-card> <el-card > <div class="text-style" style="margin: 10px 0;"> Loading @@ -110,8 +114,10 @@ </video> </div> <div style="display: flex;justify-content: space-between;margin: 10px 0;"> <el-button type="primary" plain>重置区域</el-button> <el-button type="primary" plain>下载识别视频</el-button> <!-- <el-button type="primary" plain>重置区域</el-button> --> <div></div> <el-button type="primary" plain @click="downVideo">下载识别视频</el-button> <!-- <el-button v-if="getFileType(outFilePath)=='1'" type="primary" plain @click="downVideo">下载识别视频</el-button> --> </div> </el-card> </div> Loading Loading @@ -269,6 +275,12 @@ function getFileType(fileName) { return "0"; } } function downVideo(){ window.open(baseUrl+'/algorithm/images/ResDir/2024/9/2/1830503463524630529/Safety helmet wearing detection/1725261009531_1.mp4') } getDetials() </script> Loading Loading
src/api/videoControl/videoPreview.js +18 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,23 @@ export function listAiRegionManage(query) { }) } // 获取左侧树 export function videoTreeListManage(query) { return request({ url: '/yunshou/aiRegionManage/videoTreeList', method: 'get', params: query }) } // 获取根据点位ID获取设备 export function idDevice(id) { return request({ url: `/yunshou/aiRegionManage/getVideoInfoById/${id}`, method: 'get', }) } // 查询设备列表x详情 export function detailDevice(id) { return request({ Loading Loading @@ -62,3 +79,4 @@ export function exportDevice(data) { data: data }) }
src/components/ImageUpload/index.vue +0 −1 Original line number Diff line number Diff line Loading @@ -103,7 +103,6 @@ watch(() => props.modelValue, val => { if (typeof item === "string") { if (item.indexOf(baseUrl) === -1) { item = { name: baseUrl + item, url: baseUrl + item }; console.log("🚀 ~ watch ~ item:", item) } else { item = { name: item, url: item }; } Loading
src/components/ImgVideoUpload/index.vue +3 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ :before-remove="handleDelete" :show-file-list="false" :headers="headers" :file-list="fileList" :on-preview="handlePictureCardPreview" :class="{ hide: fileList.length >= limit }" > Loading Loading @@ -61,6 +62,7 @@ append-to-body > <video width="100%" v-if="getFileType(dialogImageUrl)=='video'" :src="dialogImageUrl" controls Loading Loading @@ -151,6 +153,7 @@ watch(() => props.modelValue, val => { // 上传前loading加载 function handleBeforeUpload(file) { console.log("🚀 ~ handleBeforeUpload ~ file:", file) let isImg = false; if (props.fileType.length) { let fileExtension = ""; Loading
src/views/algorithmControl/components/form.vue +2 −1 Original line number Diff line number Diff line Loading @@ -275,7 +275,7 @@ </el-row> <el-row :gutter="10" class="mb8"> <el-col :span="24"> <el-form-item label-width="130px" label="在线体验案例图片/视频" prop="algorithmBannerVideo"> <el-form-item label-width="130px" label="在线体验案例图片/视频" prop="imgVideoData"> <ImgVideoUpload :modelValue="imgVideoData" :fileType="['png', 'jpg', 'mp4']" Loading Loading @@ -515,6 +515,7 @@ function getImageUrl(url){ form.value.cardImg=url } function getAlgorithmBannerVideo(url){ console.log("🚀 ~ getAlgorithmBanner ~ url:", url) form.value.algorithmBannerVideo=url } function getAlgorithmBanner(url){ Loading
src/views/algorithmList/components/details.vue +15 −3 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ </video> </div> <ImgVideoUpload v-if="form.algorithmStatus=='0'" style="position: absolute;bottom: 5px;left: 26%;" :modelValue="uploadUrl" :fileType="['png', 'jpg', 'mp4']" Loading @@ -77,6 +78,9 @@ :isShowTip="false" @update:modelObj="getImgObj" /> <div v-else style="position: absolute;bottom: 5px;left: 26%;" class="text-style"> 请开启算法 </div> <!-- <ImageUpload :limit='1' :fileSize="5" :isShowTip="false" @update:modelObj="getImgObj"/> --> </div> </el-card> Loading @@ -93,7 +97,7 @@ <source :src="'http://192.168.3.82'+nowImg" type="video/mp4" /> </video> </div> <el-button type="primary" plain @click="openIdentify" style="margin: 10px 0;">开始识别</el-button> <el-button v-if="form.algorithmStatus=='0'" type="primary" plain @click="openIdentify" style="margin: 10px 0;">开始识别</el-button> </el-card> <el-card > <div class="text-style" style="margin: 10px 0;"> Loading @@ -110,8 +114,10 @@ </video> </div> <div style="display: flex;justify-content: space-between;margin: 10px 0;"> <el-button type="primary" plain>重置区域</el-button> <el-button type="primary" plain>下载识别视频</el-button> <!-- <el-button type="primary" plain>重置区域</el-button> --> <div></div> <el-button type="primary" plain @click="downVideo">下载识别视频</el-button> <!-- <el-button v-if="getFileType(outFilePath)=='1'" type="primary" plain @click="downVideo">下载识别视频</el-button> --> </div> </el-card> </div> Loading Loading @@ -269,6 +275,12 @@ function getFileType(fileName) { return "0"; } } function downVideo(){ window.open(baseUrl+'/algorithm/images/ResDir/2024/9/2/1830503463524630529/Safety helmet wearing detection/1725261009531_1.mp4') } getDetials() </script> Loading