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