文件上传
This commit is contained in:
@@ -39,15 +39,15 @@ const handleClose = () => {
|
||||
}
|
||||
//文件信息
|
||||
const fileData: any = ref({})
|
||||
const open = (row: any, id: any) => {
|
||||
const open = async (row: any, id: any) => {
|
||||
dialogVisible.value = true
|
||||
loading.value = true
|
||||
const obj = {
|
||||
nDid: id,
|
||||
name: row.prjDataPath,
|
||||
type: row.type
|
||||
}
|
||||
loading.value = true
|
||||
getFileServiceFileOrDir(obj).then(res => {
|
||||
await getFileServiceFileOrDir(obj).then(res => {
|
||||
if (res.code == 'A0000') {
|
||||
fileData.value = res.data[0]
|
||||
fileData.value.nDid = id
|
||||
@@ -63,16 +63,18 @@ const handleDownLoad = () => {
|
||||
fileCheck: fileData.value.fileCheck
|
||||
}
|
||||
downLoading.value = true
|
||||
downLoadDeviceFile(obj).then(res => {
|
||||
if (res.code == 'A0000') {
|
||||
window.open(res.data, '_blank')
|
||||
downLoading.value = false
|
||||
}
|
||||
}).catch((e)=>{
|
||||
if(e){
|
||||
downLoading.value=false;
|
||||
}
|
||||
})
|
||||
downLoadDeviceFile(obj)
|
||||
.then(res => {
|
||||
if (res.code == 'A0000') {
|
||||
window.open(res.data, '_blank')
|
||||
downLoading.value = false
|
||||
}
|
||||
})
|
||||
.catch(e => {
|
||||
if (e) {
|
||||
downLoading.value = false
|
||||
}
|
||||
})
|
||||
}
|
||||
onMounted(() => {})
|
||||
onUnmounted(() => {})
|
||||
|
||||
Reference in New Issue
Block a user