mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-09 02:46:45 +08:00
Merge remote-tracking branch 'origin/dev_202306' into dev_0801test
This commit is contained in:
@@ -527,7 +527,7 @@
|
||||
name="memberExcel"
|
||||
:accept="accept"
|
||||
:action="uploadUrl"
|
||||
|
||||
:maxCount="1"
|
||||
@change="handleUploadChange"
|
||||
v-model:file-list="fileList"
|
||||
>
|
||||
@@ -561,17 +561,26 @@
|
||||
v-if="file.uploadState?.status === 'FAILED'"
|
||||
@click="downloadErrorData(file.uploadState?.url)">下载失败数据
|
||||
</div>
|
||||
<div class="cur">100%</div>
|
||||
<div
|
||||
class="cancel"
|
||||
style="margin-left: 20px; cursor: pointer"
|
||||
@click="removeUpload"
|
||||
>
|
||||
删除
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a-spin :spinning="true" v-if="file.uploadState?.status === 'START'"/>
|
||||
<div :class="fileRes.result?.successNumber == fileRes.result?.totalNumber ?'succebox':'defeatbox'">
|
||||
|
||||
</div>
|
||||
<div :class="fileRes.result?.successNumber == fileRes.result?.totalNumber ?'succebox':'defeatbox'">
|
||||
<img style="width: 14px; height: 14px; margin-left: 16px"
|
||||
:src="fileRes.result?.successNumber == fileRes.result?.totalNumber ? success:err"/>
|
||||
<div class="tacl">
|
||||
{{ fileRes.result?.totalNumber || 0 }}条数据导入,{{fileRes.result?.successNumber || 0 }}条数据导入成功
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</a-upload-dragger>
|
||||
@@ -1564,6 +1573,15 @@ const closeDrawer = () => {
|
||||
|
||||
const handleUploadChange = (record) => {
|
||||
console.log("handleUploadChange value:",record);
|
||||
if (record) {
|
||||
var FileExt = record.file.name.replace(/.+\./, "");
|
||||
if (["xls", "xlsx"].indexOf(FileExt.toLowerCase()) === -1) {
|
||||
fileList.value = [];
|
||||
message.error("请上传正确的文件格式");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
fileRes.value = {};
|
||||
if(record.file.status == "done"){
|
||||
if(record.file.response.status==200){
|
||||
@@ -1576,6 +1594,11 @@ const handleUploadChange = (record) => {
|
||||
}
|
||||
}
|
||||
|
||||
//删除
|
||||
const removeUpload = () => {
|
||||
fileList.value = [];
|
||||
};
|
||||
|
||||
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@@ -2664,14 +2687,15 @@ const handleUploadChange = (record) => {
|
||||
|
||||
.loadstate {
|
||||
width: 500px;
|
||||
margin-bottom: 50px;
|
||||
margin-bottom: 80px;
|
||||
|
||||
.loadborder {
|
||||
width: 500px;
|
||||
height: 173px;
|
||||
border-radius: 4px;
|
||||
border: 1px dashed #eaeaea;
|
||||
margin-bottom: 30px;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
@@ -2724,6 +2748,11 @@ const handleUploadChange = (record) => {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
width: 200px;
|
||||
height: 21px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.stateloading {
|
||||
|
||||
Reference in New Issue
Block a user