修改测试bug

This commit is contained in:
GGJ
2024-11-19 10:39:46 +08:00
parent 2101d03126
commit 64fb9141fd
14 changed files with 682 additions and 330 deletions

View File

@@ -7,25 +7,18 @@
<el-button :loading="loading" style="margin-left: 10px" type="primary" @click="submitUpload">
上传离线数据
</el-button>
<el-button
type="primary"
@click="handleUpload"
:loading="loading"
:disabled="offLineFileList.length == 0 || disableHandleUpload"
>
<el-button type="primary" @click="handleUpload" :loading="loading"
:disabled="offLineFileList.length == 0 || disableHandleUpload">
开始上传
</el-button>
<el-button
type="primary"
@click="removeAllFile"
:loading="loading"
:disabled="offLineFileList.length == 0"
>
清空文件
<el-button type="primary" @click="removeAllFile" :loading="loading"
:disabled="offLineFileList.length == 0">
重置上传文件
</el-button>
</div>
<div :style="tableHeight">
<vxe-table border auto-resize height="auto" :data="offLineFileList" v-bind="defaultAttribute" :key="updateKey">
<vxe-table border auto-resize height="auto" :data="offLineFileList" v-bind="defaultAttribute"
:key="updateKey">
<vxe-column field="name" align="center" title="文件名"></vxe-column>
<vxe-column field="webkitRelativePath" align="center" title="文件地址"></vxe-column>
<vxe-column field="status" align="center" title="状态" width="250">
@@ -132,6 +125,13 @@ const handleUpload = () => {
loading.value = false
disableHandleUpload.value = true
}
}).catch(()=>{
loading.value = false
disableHandleUpload.value = false
offLineFileList.value.map((item: any) => {
item.status = 0
})
updateKey.value += 1
})
}
const deviceId: any = ref()
@@ -150,6 +150,7 @@ defineExpose({ open })
<style lang="scss" scoped>
.offline_data {
width: 100%;
.offline_data_btn {
width: 100%;
height: 60px;