增加用户导入

This commit is contained in:
龙运模
2024-07-18 16:25:30 +08:00
parent a3a626292e
commit e85f113865
4 changed files with 53 additions and 4 deletions
+10 -3
View File
@@ -44,7 +44,7 @@
<el-progress class="exportPopover" :text-inside="true" :stroke-width="12" :percentage="importInfo.rate" />
</div>
<div class="errText" v-if="errorShow">
<div class="deleteErr" @click="errorShow=false"><el-icon class="icon"><el-icon-Close/></el-icon></div>
<div class="deleteErr" @click="errorClick"><el-icon class="icon"><el-icon-Close/></el-icon></div>
<el-scrollbar max-height="120px">
<p v-for="item in errorList" :key="item">{{item.msg}}</p>
</el-scrollbar>
@@ -66,11 +66,11 @@ export default {
props:{
size:{type:String, default:'small'},
title:{type:String, default: ""},
text:{type:String, default: ""}
},
data(){
return{
visible: false,
text:"",
oss:{
host:''
@@ -100,7 +100,7 @@ export default {
},
methods:{
getWsResult(res){
if(res.data && (res.data.type == 5)){
if(res.data && (res.data.type == 4 || res.data.type == 5)){
this.importInfo = res.data;
this.progressShow = true;
if(res.data.status == 0){
@@ -125,6 +125,7 @@ export default {
this.$message.warning(`只能选择的excel文件类型`);
return false;
}
this.text = file.name;
return true
},
async uploadFile({ file }) {
@@ -145,9 +146,15 @@ export default {
this.importTrue = false;
setTimeout(()=>{
this.importDis = false;
this.errorClick();
},100)
},
errorClick(){
this.errorShow= false;
this.errorList= []
},
save(){
this.errorClick();
this.$emit('parentParams',this.params);
},
// 上传成功