文件服务删除/设备重启输入密码错误处理
This commit is contained in:
@@ -245,17 +245,27 @@ const handleRestartDevice = () => {
|
||||
inputType: 'text'
|
||||
})
|
||||
.then(({ value }) => {
|
||||
console.log(document.querySelector('.custom-message-box'), '77788888', value)
|
||||
passwordConfirm(value).then((resp: any) => {
|
||||
if (resp.code == 'A0000') {
|
||||
reStartDevice({ nDid: nDid.value }).then((res: any) => {
|
||||
if (res.code == 'A0000') {
|
||||
deviceRestartLoading.value = false
|
||||
ElMessage({ message: res.message, type: 'success', duration: 5000 })
|
||||
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') {
|
||||
deviceRestartLoading.value = false
|
||||
ElMessage({ message: res.message, type: 'success', duration: 5000 })
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(e => {
|
||||
loading.value = false
|
||||
deviceRestartLoading.value = false
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
deviceRestartLoading.value = false
|
||||
@@ -398,26 +408,32 @@ const handleDelDirOrFile = (row: any) => {
|
||||
inputType: 'text'
|
||||
})
|
||||
.then(({ value }) => {
|
||||
passwordConfirm(value).then((resp: any) => {
|
||||
if (resp.code == 'A0000') {
|
||||
delDeviceDir({ nDid: nDid.value, path: row.prjDataPath }).then((res: any) => {
|
||||
if (res.code == 'A0000') {
|
||||
reloadCurrentMenu(res.message)
|
||||
loading.value = false
|
||||
// ElMessage({ message: res.message, type: 'success', duration: 5000 })
|
||||
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') {
|
||||
reloadCurrentMenu(res.message)
|
||||
loading.value = false
|
||||
// ElMessage({ message: res.message, type: 'success', duration: 5000 })
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
.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
|
||||
@@ -655,7 +671,6 @@ onBeforeUnmount(() => {
|
||||
padding: 20px 10px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.customInput{
|
||||
|
||||
.customInput {
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user