From a03fd5263165ac18a7bbc0e7de6795f9c79db897 Mon Sep 17 00:00:00 2001
From: odc.xiaohui <xiaohui@Q1>
Date: 星期三, 20 十二月 2023 17:36:58 +0800
Subject: [PATCH] 修改视频专网内网

---
 src/views/index.vue                 |   67 +++++++++++++++++++++++++++++----
 vite.config.ts                      |    1 
 src/components/FileUpload/index.vue |    6 +-
 src/views/system/oss/index.vue      |    5 +-
 4 files changed, 65 insertions(+), 14 deletions(-)

diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue
index 17db971..63ceee9 100644
--- a/src/components/FileUpload/index.vue
+++ b/src/components/FileUpload/index.vue
@@ -172,9 +172,9 @@
   }
 }
 const handleUploadProgress=(e: any) => {
-  debounce(() =>{
-    emit('closePopup','123123');
-  },1500)
+  // downloadProgress.value = downloadProgress.value + 50
+  // emit('closePopup','123123');
+  emit('openPopup','123123');
 }
 // 涓婁紶鎴愬姛鍥炶皟
 const handleUploadSuccess = (res: any, file: UploadFile) => {
diff --git a/src/views/index.vue b/src/views/index.vue
index a6b7af8..6fee3cb 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -69,7 +69,7 @@
     <el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
       <el-form ref="ossFormRef" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="鏂囦欢鍚�">
-          <fileUpload ref="childFile" @closePopup="getList();lookPawsd($event)"  v-model="form.file"  v-if="type === 0" />
+          <fileUpload ref="childFile" @closePopup="getList();lookPawsd($event)" @openPopup="lookPawsd($event)" v-model="form.file"  v-if="type === 0" />
           <imageUpload v-model="form.file" v-if="type === 1" />
           <video-upload v-model="form.file" v-if="type === 2" />
         </el-form-item>
@@ -96,6 +96,19 @@
         </div>
       </template>
     </el-dialog>
+    <el-dialog
+      v-model="dialogVisible"
+      title=""
+      width="30%"
+      :close-on-click-modal = "false"
+      :close-on-press-escape = "false"
+      :show-close = "false"
+
+    >
+    <span @closePopup1="lookPawsd1()">
+    <el-progress type="dashboard" :percentage="percentage2" :color="colors" />
+    </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -108,6 +121,7 @@
 import usePermissionStore from "@/store/modules/permission";
 import { isHttp } from "@/utils/validate";
 import router from '@/router';
+import { ref } from "vue";
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
 
 const ossList = ref<OssVO[]>([]);
@@ -123,6 +137,13 @@
 const previewListResource = ref(true);
 const dateRangeCreateTime = ref<[DateModelType, DateModelType]>(['', '']);
 const visibleCode = ref(false);
+const colors = [
+  { color: '#f56c6c', percentage: 20 },
+  { color: '#e6a23c', percentage: 40 },
+  { color: '#5cb87a', percentage: 60 },
+  { color: '#1989fa', percentage: 80 },
+  { color: '#6f7ad3', percentage: 100 },
+]
 const dialog = reactive<DialogOption>({
   visible: false,
   title: ''
@@ -142,7 +163,8 @@
 
 const ossFormRef = ref<ElFormInstance>();
 const queryFormRef = ref<ElFormInstance>();
-
+const dialogVisible = ref(false)
+const percentage2 = ref(0)
 const initFormData = {
   file: undefined,
 }
@@ -291,13 +313,40 @@
   await childFile.value.handleCilck()
   dialog.visible = false;
 }
-const lookPawsd = async (row:any) => {
-  console.log(row);
-  // row.msg = ':/"123456'
-  //     testtxt.value = row.msg.slice(2);
-      titleDownload.value = '鏌ョ湅鎻愬彇鐮�'
-      pasTxt.value = ''
-      visibleCode.value = true
+const state = reactive({
+  mytime:0,//瀹氫箟瀹氭椂鍣�
+})
+watch(percentage2, (new1,new2) => {
+  console.log(new1,new2)
+  if(new1 == 95){
+    clearInterval(state.mytime);
+    state.mytime = 0;
+  }
+})
+const lookPawsd1 = async () => {
+  dialogVisible.value = true;
+}
+const lookPawsd = async (row: any) => {
+  console.log(row, row.ossId);
+  percentage2.value = 0;
+  clearInterval(state.mytime);
+  state.mytime = 0;
+  if(row == '123123'){
+    dialogVisible.value = true;
+    state.mytime = setInterval(() => {
+      percentage2.value = (percentage2.value % 100) + 5
+    }, 500)
+  }
+  else{
+    dialogVisible.value = false;
+    clearInterval(state.mytime);
+    state.mytime = 0;
+    testtxt.value = row.msg;
+    titleDownload.value = '鏌ョ湅鎻愬彇鐮�'
+    pasTxt.value = ''
+    visibleCode.value = true
+  }
+
 }
 const handleCode = async (row: OssVO) => {
   console.log(row, row.ossId);
diff --git a/src/views/system/oss/index.vue b/src/views/system/oss/index.vue
index 3dc6252..71103f6 100644
--- a/src/views/system/oss/index.vue
+++ b/src/views/system/oss/index.vue
@@ -66,7 +66,7 @@
     <el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
       <el-form ref="ossFormRef" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="鏂囦欢鍚�">
-          <fileUpload ref="childFile" @closePopup="getList();lookPawsd($event)"  v-model="form.file"  v-if="type === 0" />
+          <fileUpload ref="childFile" @closePopup="getList();lookPawsd($event)" @openPopup="lookPawsd($event)" v-model="form.file"  v-if="type === 0" />
           <imageUpload v-model="form.file" v-if="type === 1" />
           <video-upload v-model="form.file" v-if="type === 2" />
         </el-form-item>
@@ -351,6 +351,7 @@
 }
 const lookPawsd = async (row: any) => {
   console.log(row, row.ossId);
+  percentage2.value = 0;
   clearInterval(state.mytime);
     state.mytime = 0;
   if(row == '123123'){
@@ -363,7 +364,7 @@
     dialogVisible.value = false;
     clearInterval(state.mytime);
     state.mytime = 0;
-    testtxt.value = row.password;
+    testtxt.value = row.msg;
   titleDownload.value = '鏌ョ湅鎻愬彇鐮�'
   pasTxt.value = ''
   visibleCode.value = true
diff --git a/vite.config.ts b/vite.config.ts
index 497d0d4..731a682 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -29,6 +29,7 @@
           target: 'http://80.36.32.176:8080',
           // target: 'http://51.9.57.211:8080',
           // target: 'http://80.36.32.176:8080',
+          // target: 'http://162.14.79.111:2023',
           changeOrigin: true,
           rewrite: (path) => path.replace(new RegExp('^' + env.VITE_APP_BASE_API), '')
         }

--
Gitblit v1.8.0