Commit 026bd786 authored by 胡占生's avatar 胡占生 🇨🇳
Browse files

fix: 视频管理,左侧树联调,视频联调

parent 387ebb07
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -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({
@@ -62,3 +79,4 @@ export function exportDevice(data) {
    data: data
  })
}
+0 −1
Original line number Diff line number Diff line
@@ -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 };
        }
+3 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@
      :before-remove="handleDelete"
      :show-file-list="false"
      :headers="headers"
      :file-list="fileList"
      :on-preview="handlePictureCardPreview"
      :class="{ hide: fileList.length >= limit }"
    >
@@ -61,6 +62,7 @@
      append-to-body
    >
      <video
        width="100%"
        v-if="getFileType(dialogImageUrl)=='video'"
        :src="dialogImageUrl"
        controls
@@ -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 = "";
+2 −1
Original line number Diff line number Diff line
@@ -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']"
@@ -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){
+15 −3
Original line number Diff line number Diff line
@@ -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']"
@@ -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>
@@ -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;">
@@ -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>
@@ -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