文件服务删除/设备重启输入密码错误处理
This commit is contained in:
@@ -245,8 +245,13 @@ const handleRestartDevice = () => {
|
||||
inputType: 'text'
|
||||
})
|
||||
.then(({ value }) => {
|
||||
console.log(document.querySelector('.custom-message-box'), '77788888', value)
|
||||
passwordConfirm(value).then((resp: any) => {
|
||||
if (!value) {
|
||||
ElMessage.warning('请输入密码')
|
||||
loading.value = false
|
||||
deviceRestartLoading.value = false
|
||||
} else {
|
||||
passwordConfirm(value)
|
||||
.then((resp: any) => {
|
||||
if (resp.code == 'A0000') {
|
||||
reStartDevice({ nDid: nDid.value }).then((res: any) => {
|
||||
if (res.code == 'A0000') {
|
||||
@@ -256,6 +261,11 @@ const handleRestartDevice = () => {
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(e => {
|
||||
loading.value = false
|
||||
deviceRestartLoading.value = false
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
deviceRestartLoading.value = false
|
||||
@@ -398,7 +408,12 @@ const handleDelDirOrFile = (row: any) => {
|
||||
inputType: 'text'
|
||||
})
|
||||
.then(({ value }) => {
|
||||
passwordConfirm(value).then((resp: any) => {
|
||||
if (!value) {
|
||||
ElMessage.warning('请输入密码')
|
||||
loading.value = false
|
||||
} else {
|
||||
passwordConfirm(value)
|
||||
.then((resp: any) => {
|
||||
if (resp.code == 'A0000') {
|
||||
delDeviceDir({ nDid: nDid.value, path: row.prjDataPath }).then((res: any) => {
|
||||
if (res.code == 'A0000') {
|
||||
@@ -409,15 +424,16 @@ const handleDelDirOrFile = (row: any) => {
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(e => {
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
loading.value = false
|
||||
// deviceRestartLoading.value = false
|
||||
})
|
||||
}
|
||||
//取消删除
|
||||
const cancelEvent = () => {}
|
||||
const changeType = ref<string>('')
|
||||
const changeType = ref<any>('')
|
||||
//下载文件
|
||||
const fileRef = ref()
|
||||
const handleDownLoad = async (row: any) => {
|
||||
@@ -428,7 +444,7 @@ const handleDownLoad = async (row: any) => {
|
||||
localStorage.setItem('changeType', changeType.value)
|
||||
}
|
||||
//上传文件
|
||||
const fileName = ref<string>('')
|
||||
const fileName = ref<any>('')
|
||||
const handleUpload = (e: any, fileList: any, row: any) => {
|
||||
// loading.value=true
|
||||
fileName.value = e.name
|
||||
@@ -656,6 +672,5 @@ onBeforeUnmount(() => {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.customInput {
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user