文件上传进度条
This commit is contained in:
@@ -213,3 +213,13 @@
|
||||
.el-drawer__header {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
//tabs 添加icon样式
|
||||
.custom-tabs-label{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.el-icon {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
@@ -62,10 +62,20 @@
|
||||
<div class="list" v-if="dirList.length != 0 && !loading">
|
||||
<div class="list_item" v-for="(item, index) in dirList" :key="index">
|
||||
<div class="item_download">
|
||||
<el-button
|
||||
v-if="activePath && activePath != '/'"
|
||||
type="danger"
|
||||
size="small"
|
||||
@click="handleDelDirOrFile(item)"
|
||||
circle
|
||||
>
|
||||
<el-icon><Delete /></el-icon>
|
||||
</el-button>
|
||||
<el-button v-if="item?.type == 'file'" size="small" @click="handleDownLoad(item)" circle>
|
||||
<el-icon><Download /></el-icon>
|
||||
</el-button>
|
||||
<el-popconfirm
|
||||
|
||||
<!-- <el-popconfirm
|
||||
width="220"
|
||||
confirm-button-text="确认"
|
||||
cancel-button-text="取消"
|
||||
@@ -78,7 +88,7 @@
|
||||
<el-icon><Delete /></el-icon>
|
||||
</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</el-popconfirm> -->
|
||||
</div>
|
||||
<img v-if="item?.type == 'dir'" @click="handleIntoDir(item)" src="@/assets/img/wenjianjia.svg" />
|
||||
<img
|
||||
@@ -180,22 +190,7 @@ const nodeClick = (e: any) => {
|
||||
loading.value = true
|
||||
nDid.value = e.ndid
|
||||
dirList.value = []
|
||||
activePath.value = ''
|
||||
activePathList.value = []
|
||||
// getDeviceRootPath(nDid.value)
|
||||
// .then((res: any) => {
|
||||
// loading.value = false
|
||||
// dirList.value = [res.data]
|
||||
// activePath.value = res.data.prjDataPath
|
||||
// activePathList.value.map((item: any, index: any) => {
|
||||
// if (item.path.indexOf(res.data.prjDataPath) == -1) {
|
||||
// activePathList.value.push({ path: activePath.value })
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
// .catch(e => {
|
||||
// loading.value = false
|
||||
// })
|
||||
activePath.value = '/'
|
||||
getFileServiceFileOrDir({ nDid: nDid.value, name: activePath.value, type: 'dir' })
|
||||
.then((resp: any) => {
|
||||
@@ -240,9 +235,13 @@ const deviceRestartLoading = ref<boolean>(false)
|
||||
const handleRestartDevice = () => {
|
||||
deviceRestartLoading.value = true
|
||||
ElMessageBox.prompt('二次校验密码确认', '装置重启', {
|
||||
// confirmButtonText: '确认',
|
||||
// cancelButtonText: '取消',
|
||||
// customClass: 'customInput',
|
||||
// inputType: 'text'
|
||||
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
customClass: 'customInput',
|
||||
inputType: 'text'
|
||||
})
|
||||
.then(({ value }) => {
|
||||
@@ -385,12 +384,36 @@ const submitDeviceDir = () => {
|
||||
//删除文件夹或文件
|
||||
const handleDelDirOrFile = (row: any) => {
|
||||
loading.value = true
|
||||
// delDeviceDir({ nDid: nDid.value, path: row.prjDataPath }).then((res: any) => {
|
||||
// if (res.code == 'A0000') {
|
||||
// reloadCurrentMenu(res.message)
|
||||
// // ElMessage({ message: res.message, type: 'success', duration: 5000 })
|
||||
// }
|
||||
// })
|
||||
|
||||
ElMessageBox.prompt('二次校验密码确认', '删除', {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
customClass: 'customInput',
|
||||
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 })
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
loading.value = false
|
||||
// deviceRestartLoading.value = false
|
||||
})
|
||||
}
|
||||
//取消删除
|
||||
const cancelEvent = () => {}
|
||||
@@ -492,7 +515,7 @@ mqttRef.value.on('close', function () {
|
||||
console.log('mqtt客户端已断开连接.....')
|
||||
})
|
||||
onMounted(() => {
|
||||
status.value =0
|
||||
status.value = 0
|
||||
fileName.value = localStorage.getItem('fileName') ? localStorage.getItem('fileName') : ''
|
||||
changeType.value = localStorage.getItem('changeType') ? localStorage.getItem('changeType') : ''
|
||||
})
|
||||
@@ -631,5 +654,8 @@ onBeforeUnmount(() => {
|
||||
.el-form {
|
||||
padding: 20px 10px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.customInput{
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user