shish 2 лет назад
Родитель
Сommit
bb96c221bf
1 измененных файлов с 10 добавлено и 2 удалено
  1. 10 2
      ghs/src/views/member/list.vue

+ 10 - 2
ghs/src/views/member/list.vue

@@ -76,8 +76,12 @@
 				<el-upload
   class="upload-demo"
   :action="fileUrl"
+  :headers="{ token: token }"
   multiple
-  :limit="1">
+  :show-file-list="false"
+  :on-success="fileUpSuccess"
+  accept=".xls,.xlsx"
+  :limit="3">
   <el-button size="small" type="primary">批量导入客户</el-button>
 </el-upload>
 			</template>
@@ -203,7 +207,8 @@ export default {
 		};
 	},
 	computed: {
-		...mapGetters({ levelData: 'level' })
+		...mapGetters({ levelData: 'level' }),
+		...mapGetters(['token'])
 	},
 	created() {
 		this.fileUrl = baseUrl+'/upload/custom'
@@ -235,6 +240,9 @@ export default {
 			let query = {}
 			this.$router.push({path:'/in/add',query})
 		},
+		fileUpSuccess(){
+			this.$notify({ title: '已提交,2分钟后查看客户列表', message: 'success', type: 'success'})
+		},
 		add(){
 			this.addPop = true
 		},