1.下载完成后关闭弹框2.点击菜单栏跳转加loading

This commit is contained in:
zhujiyan
2024-09-02 18:39:44 +08:00
parent 40c909ea61
commit 3a1520aa95
3 changed files with 7 additions and 1 deletions

View File

@@ -189,6 +189,7 @@ const handleIntoByPath = async (val: any) => {
type: 'dir' type: 'dir'
} }
activePath.value = val.path activePath.value = val.path
loading.value=true
getFileServiceFileOrDir(obj).then(res => { getFileServiceFileOrDir(obj).then(res => {
dirList.value = res.data dirList.value = res.data
activePathList.value.map((item: any, index: any) => { activePathList.value.map((item: any, index: any) => {
@@ -196,6 +197,7 @@ const handleIntoByPath = async (val: any) => {
activePathList.value.splice(index, 1) activePathList.value.splice(index, 1)
} }
}) })
loading.value=false
}) })
} }

View File

@@ -30,6 +30,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ref, onMounted, defineExpose, onBeforeUnmount, onUnmounted, defineEmits } from 'vue' import { ref, onMounted, defineExpose, onBeforeUnmount, onUnmounted, defineEmits } from 'vue'
import { getFileServiceFileOrDir, downLoadDeviceFile } from '@/api/cs-device-boot/fileService.ts' import { getFileServiceFileOrDir, downLoadDeviceFile } from '@/api/cs-device-boot/fileService.ts'
import { ElMessage } from 'element-plus'
const dialogVisible = ref(false) const dialogVisible = ref(false)
const loading = ref(false) const loading = ref(false)
const downLoading = ref(false) const downLoading = ref(false)
@@ -68,6 +69,8 @@ const handleDownLoad = () => {
if (res.code == 'A0000') { if (res.code == 'A0000') {
window.open(res.data, '_blank') window.open(res.data, '_blank')
downLoading.value = false downLoading.value = false
ElMessage.success(res.message)
handleClose()
} }
}) })
.catch(e => { .catch(e => {

View File

@@ -17,7 +17,8 @@ export default defineConfig({
// target: 'http://192.168.1.122:10215', //gfh // target: 'http://192.168.1.122:10215', //gfh
// target: 'http://192.168.1.127:10215', //cdf // target: 'http://192.168.1.127:10215', //cdf
// target: 'http://192.168.1.125:10215', // target: 'http://192.168.1.125:10215',
target: 'https://pqmcn.com:8092/api', //治理 target: 'http://192.168.1.126:10215',
// target: 'https://pqmcn.com:8092/api', //治理
// target:'http://www.zhilitest.com:8089/api', // target:'http://www.zhilitest.com:8089/api',
changeOrigin: true, changeOrigin: true,
rewrite: path => path.replace(/^\/api/, '') //路径重写,把'/api'替换为'' rewrite: path => path.replace(/^\/api/, '') //路径重写,把'/api'替换为''